/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --color-bg:      #f5f3f7;
  --color-surface: #ffffff;
  --color-primary: #7c3aed;
  --color-primary-light: #a78bfa;
  --color-income:  #059669;
  --color-expense: #dc2626;
  --color-border:  #e9e5f0;
  --color-text:    #1e1b2e;
  --color-muted:   #6b6180;
  --shadow-card:   0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
}

/* ============================================================
   Global Reset
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  overflow-x: hidden;
  width: 100%;
}

@media (min-width: 901px) {
  html {
    height: 100%;
    overflow: hidden;
  }
  body {
    height: 100%;
    overflow: hidden;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  background: var(--color-bg);
  color: var(--color-text);
}

/* ============================================================
   Responsive Helpers
   ============================================================ */
.desktop-only { display: none; }
.mobile-only  { display: block; }

@media (min-width: 901px) {
  .desktop-only { display: block; }
  .mobile-only  { display: none !important; }
}

/* ============================================================
   Layout
   ============================================================ */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (min-width: 901px) {
  .layout {
    height: 100vh;
    overflow: hidden;
  }
}

/* ============================================================
   App Header
   ============================================================ */
.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  max-height: 48px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #6d28d9 100%);
  border-bottom: none;
  flex-shrink: 0;
}

.app-header h1 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}
.app-header h1 span {
  color: rgba(255,255,255,0.7) !important;
}
.app-header p {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-right: auto;
}

.signout-btn {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}
.signout-btn:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }

/* ============================================================
   Filter Bar
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.filter-bar select,
#report-filters select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  color: var(--color-text);
  cursor: pointer;
}

.filter-bar select:focus,
#report-filters select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.12);
}

/* ============================================================
   Login Screen
   ============================================================ */
#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
}
#login-screen h1 { font-size: 22px; font-weight: 600; }
#login-screen p  { font-size: 14px; color: var(--color-muted); }

.login-btn {
  padding: 12px 32px;
  font-size: 15px;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.login-btn:hover { opacity: 0.88; }

/* ============================================================
   Session Banner
   ============================================================ */
.session-banner {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: #7a6000;
  display: none;
}
.session-banner a { color: #7a6000; font-weight: 600; }

/* ============================================================
   Report Filters
   ============================================================ */
@media (max-width: 900px) {
  #report-filters { display: none; }
}

/* ============================================================
   Panels
   ============================================================ */
.panel { display: none; }
.panel.active { display: block; }

@media (min-width: 901px) {
  #panel-report { display: block; }
}

/* ============================================================
   Stats Grid
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 12px;
  flex-shrink: 0;
}

.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 10px 12px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  overflow: hidden;
  max-height: 64px;
}

.stat-label {
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: clamp(14px, 2.5vw, 22px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value.income  { color: var(--color-income); }
.stat-value.expense { color: var(--color-expense); }
.stat-value.net     { color: var(--color-text); }

/* ============================================================
   Content Grid (two-column desktop layout)
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 320px);
  gap: 8px;
  padding: 0 12px;
  flex: 1;
  overflow: hidden;
}

.content-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  height: 100%;
  padding: 4px 0;
}

/* ============================================================
   Right Column Wrapper (transactions + chat as siblings)
   ============================================================ */
.content-right-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow: hidden;
}

.content-right {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 10px;
  box-shadow: var(--shadow-card);
}

.content-right .txn-section-header {
  position: static;
  flex-shrink: 0;
}

.content-right .txn-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.content-right .pagination {
  position: static;
  flex-shrink: 0;
  border-top: 1px solid var(--color-border);
  padding-top: 8px;
  margin-top: 4px;
  background: transparent;
}

/* ============================================================
   Chat Panel — separate card below transactions
   ============================================================ */
.chat-panel {
  background: #fffde7;
  border: 2px solid #f59e0b;
  border-radius: 4px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(245,158,11,.12);
  display: flex;
  flex-direction: column;
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.chat-panel--accent {
  /* No accent needed */
}

.chat-panel .chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.chat-panel .msg {
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
}

.chat-panel .msg.bot {
  background: #ffffff;
  border: 1px solid #f0e68c;
  color: var(--color-text);
}

.chat-panel .msg.user {
  background: var(--color-primary);
  color: white;
}

.chat-panel .msg.error {
  background: #fff0f0;
  border: 1px solid #ffcccc;
  color: #cc0000;
}

.chat-panel .msg.loading {
  background: #ffffff;
  border: 1px solid #f0e68c;
  color: var(--color-muted);
  font-style: italic;
}

.chat-panel .input-row {
  padding: 8px 10px 6px;
  border-top: 1px solid #f0e68c;
  background: #fff9c4;
  flex-shrink: 0;
  display: flex;
  gap: 6px;
}

.chat-panel .input-row input {
  min-width: 0;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid #f0e68c;
  color: var(--color-text);
}
.chat-panel .input-row input::placeholder {
  color: var(--color-muted);
}
.chat-panel .input-row input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.12);
  outline: none;
}

.chat-panel #send-btn {
  background: var(--color-primary);
  color: white;
}

.chat-panel .hint {
  padding: 2px 10px 4px;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--color-muted);
  margin-top: 0;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #f0e68c;
  flex-shrink: 0;
}

.chat-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.chat-help-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #d8d3e3;
  background: white;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.chat-help-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

.chat-help-content {
  display: none;
  padding: 8px 12px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  font-size: 11px;
  color: #92400e;
  line-height: 1.5;
  flex-shrink: 0;
}
.chat-help-content.open {
  display: block;
}
.chat-help-content p {
  margin: 1px 0;
}
.chat-help-content strong {
  color: #78350f;
}

/* ============================================================
   Charts — pie charts with fixed aspect ratio
   ============================================================ */
.charts-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.charts-pair .chart-container {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.chart-wrapper {
  position: relative;
  max-width: 100%;
  min-height: 200px;
}

.charts-pair .chart-wrapper {
  position: relative;
  max-width: 100%;
  min-height: 200px;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 12px;
  box-shadow: var(--shadow-card);
  max-width: 100%;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.trend-chart-container {
  min-height: unset;
  margin-bottom: 0;
}

.trend-chart-wrapper {
  position: relative;
  height: 180px;
  max-width: 100%;
}

/* Legend scrolling for charts with many categories */
.chart-legend-scroll {
  overflow: visible;
}
.chart-legend-scroll canvas {
  max-height: calc(100% - 100px);
}

/* Text summary fallback when canvas container is too small */
.chart-text-summary {
  font-size: 12px;
  color: var(--color-muted);
  padding: 8px 0;
  line-height: 1.6;
}

/* ============================================================
   Chat Log (generic — used by mobile messages too)
   ============================================================ */
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 160px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 12px;
  box-shadow: var(--shadow-card);
}

.msg {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 90%;
}

.msg.bot     { background: var(--color-bg); border: 1px solid var(--color-border); align-self: flex-start; color: var(--color-text); }
.msg.user    { background: var(--color-primary); color: white; align-self: flex-end; }
.msg.error   { background: #fff0f0; border: 1px solid #ffcccc; color: #cc0000; align-self: flex-start; }
.msg.loading { background: var(--color-bg); border: 1px solid var(--color-border); align-self: flex-start; color: var(--color-muted); font-style: italic; }

.input-row { display: flex; gap: 6px; }

.input-row input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  outline: none;
  background: white;
  color: var(--color-text);
}
.input-row input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.12);
}

#send-btn, #send-btn-mobile {
  padding: 8px 12px;
  font-size: 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#send-btn:hover, #send-btn-mobile:hover { opacity: 0.88; }
#send-btn:disabled, #send-btn-mobile:disabled { opacity: 0.45; cursor: not-allowed; }

.hint { font-size: 11px; color: var(--color-muted); margin-top: 6px; }

/* ============================================================
   Transaction List
   ============================================================ */
.txn-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-surface);
}

.txn-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.txn-tabs { display: flex; gap: 4px; }

.txn-tab {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  color: var(--color-muted);
}
.txn-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.txn-tab.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Sort tabs */
.txn-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.sort-tabs { display: flex; gap: 4px; }

.sort-tab {
  padding: 3px 8px;
  font-size: 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  color: var(--color-muted);
}
.sort-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.sort-tab.active {
  background: var(--color-text);
  color: white;
  border-color: var(--color-text);
}

/* Category multi-select dropdown */
.category-filter-wrapper {
  position: relative;
  display: inline-block;
}

.category-filter-btn {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-filter-btn:hover {
  border-color: var(--color-primary);
}

.category-filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  min-width: 160px;
  padding: 4px 0;
}

.category-filter-dropdown.open {
  display: block;
}

.category-filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--color-text);
  cursor: pointer;
  white-space: nowrap;
}
.category-filter-item:hover {
  background: var(--color-bg);
}

.category-filter-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.txn-list {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.txn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}
.txn:last-child { border-bottom: none; }

.txn-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  padding-left: 0;
}

.txn-category {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txn-vendor {
  font-size: 11px;
  color: var(--color-muted);
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  line-height: 1.4;
}

.txn-meta {
  font-size: 11px;
  color: var(--color-muted);
}

.txn-amount {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
  order: -1;
}
.txn-amount.income  { color: var(--color-income); }
.txn-amount.expense { color: var(--color-expense); }

.txn-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.txn-rate {
  cursor: help;
  text-decoration: underline dotted var(--color-muted);
  text-underline-offset: 2px;
  position: relative;
  display: inline-block;
}

.txn-rate:hover::after {
  content: "Rate: " attr(data-rate);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: white;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.empty { text-align: center; color: var(--color-muted); font-size: 13px; padding: 30px 0; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  color: var(--color-text);
  cursor: pointer;
}
.pagination button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

#page-indicator {
  font-size: 12px;
  color: var(--color-muted);
  min-width: 70px;
  text-align: center;
}

#page-size-select {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  color: var(--color-muted);
  cursor: pointer;
}

/* ============================================================
   Sticky Header (filters + stats)
   ============================================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.period-heading {
  display: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  padding: 0 12px;
}

/* ============================================================
   Mobile Fixed Bottom Input Bar
   ============================================================ */
.mobile-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff9c4;
  border-top: 1px solid #f0e68c;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  z-index: 200;
}

.mobile-input-bar input {
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  outline: none;
  background: white;
}
.mobile-input-bar input:focus {
  border-color: var(--color-primary);
}

.mobile-input-bar button {
  padding: 12px 20px;
  font-size: 15px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================================
   Mobile Toast
   ============================================================ */
.mobile-toast {
  position: fixed;
  bottom: 80px;
  left: 16px;
  right: 16px;
  background: var(--color-text);
  color: white;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
  z-index: 300;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.mobile-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================
   Mobile Filters Row
   ============================================================ */
.mobile-filters {
  display: flex;
  gap: 6px;
  padding-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-filters select {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: white;
  color: var(--color-text);
}

/* ============================================================
   Mobile Messages Area
   ============================================================ */
.mobile-messages {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  min-height: 120px;
  max-height: 40vh;
  overflow-y: auto;
  padding: 10px 12px;
  display: none;
  flex-direction: column;
  gap: 6px;
  background: #fffde7;
  border-top: 2px solid #f59e0b;
  box-shadow: 0 -4px 12px rgba(245,158,11,.1);
  z-index: 190;
}

.mobile-messages:empty {
  display: none !important;
}

.mobile-messages.active {
  display: flex !important;
}

.mobile-messages .msg {
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
  max-width: 85%;
}

.mobile-messages .msg.bot {
  background: #ffffff;
  border: 1px solid #f0e68c;
  color: var(--color-text);
  align-self: flex-start;
}

.mobile-messages .msg.user {
  background: var(--color-primary);
  color: white;
  align-self: flex-end;
}

.mobile-messages .msg.error {
  background: #fff0f0;
  border: 1px solid #ffcccc;
  color: #cc0000;
  align-self: flex-start;
}

/* ============================================================
   Mobile Responsive Overrides
   ============================================================ */
@media (max-width: 900px) {
  html, body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .layout {
    min-height: 100vh;
    height: auto;
    overflow: visible;
    padding-bottom: 70px; /* space for fixed bottom input bar */
  }

  .content-grid {
    grid-template-columns: 1fr;
    overflow: visible;
    overflow-x: hidden;
    flex: none; /* remove flex: 1 on mobile */
    padding: 0 8px;
    max-width: 100vw;
  }

  .content-left, .content-right, .content-right-wrapper {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .charts-pair {
    grid-template-columns: 1fr;
    max-width: 100%;
    overflow: hidden;
  }

  .chart-container {
    margin-bottom: 8px;
    overflow: hidden;
    max-width: 100%;
  }

  .chart-wrapper, .charts-pair .chart-wrapper {
    overflow: hidden;
    max-width: 100%;
    min-height: 180px;
  }

  .trend-chart-wrapper {
    overflow: hidden;
    max-width: 100%;
  }

  .content-left {
    height: auto;
    max-height: none;
    overflow-y: visible;
    padding: 0;
  }

  .content-right {
    height: auto;
    max-height: none;
    overflow-y: visible;
    overflow: visible;
  }

  .content-right-wrapper {
    height: auto;
    overflow: visible;
  }

  .content-right .txn-list {
    overflow-y: visible;
    flex: none;
    min-height: 0;
  }

  .txn-list {
    max-width: 100%;
    overflow-x: hidden;
  }

  .txn {
    max-width: 100%;
  }

  .txn-amount {
    min-width: 60px;
  }

  .stats {
    padding: 0 8px;
  }

  .filter-bar {
    max-height: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 6px 8px;
  }

  .chat-panel {
    display: none;
  }

  .app-header {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 4px;
    max-height: none;
  }

  .txn-vendor {
    white-space: normal;
    overflow: visible;
  }
  .txn-category {
    white-space: normal;
    overflow: visible;
  }

  .trend-chart-wrapper {
    height: 160px;
  }

  .sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-bg);
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .period-heading {
    display: none;
  }

  .mobile-filters {
    padding: 8px 8px 14px;
  }

  .mobile-input-bar {
    display: flex !important;
  }
  .mobile-messages:empty {
    display: none !important;
  }
  .mobile-messages.active {
    display: flex !important;
  }
}
