/* Transações — v1.6.1: consulta por lupa + resumo de resultados */
#view-transactions {
  --page-accent: #155f92;
  --page-accent-soft: rgba(21, 95, 146, .10);
}

.transactions-actionbar {
  margin-bottom: 12px;
  animation: searchReveal .22s ease both;
}

.transactions-search-tools {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.transactions-search-box {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.filter-trigger {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--page-accent);
  box-shadow: var(--shadow-sm);
}

#view-transactions .filters-panel {
  border: 1px solid rgba(21,95,146,.14);
  background: linear-gradient(180deg, #f7fbfe, #fff);
  border-radius: 20px;
}

.search-result-summary {
  width: 100%;
  min-height: 64px;
  margin: 0 0 12px;
  padding: 12px 16px;
  border: 1px solid rgba(21,95,146,.16);
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbfe, #fff);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.search-result-summary > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
}

.search-result-summary > span i { color: var(--page-accent); }
.search-result-summary > strong { font-size: 1.05rem; color: var(--page-accent); white-space: nowrap; }

.details-expanders {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.details-expander {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.details-expander > summary {
  list-style: none;
  cursor: pointer;
  min-height: 64px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #fbfdff, #f7fafc);
}

.details-expander > summary::-webkit-details-marker { display: none; }
.details-expander > summary > span { display: flex; align-items: center; gap: 11px; min-width: 0; }
.details-expander > summary > span > i { color: var(--page-accent); }
.details-expander > summary strong,
.details-expander > summary small { display: block; }
.details-expander > summary small { color: var(--muted); margin-top: 2px; font-size: .76rem; }
.details-expander .expander-chevron { transition: transform .24s ease; }
.details-expander[open] .expander-chevron { transform: rotate(180deg); }
.details-expander-body { padding: 14px; border-top: 1px solid var(--line); }
.details-installment-content { border: 0; padding: 0; }
.compact-details-hero { margin-bottom: 0; }

@keyframes searchReveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

#fab {
  width: 56px;
  min-width: 56px;
  padding: 0;
}

/* v1.6.2 — feed compacto, no mesmo espírito da lista de Recentes */
#view-transactions .transaction-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

#view-transactions .list-head { display: none !important; }

#view-transactions .transaction-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

#view-transactions .transaction-compact-row {
  position: relative;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #edf2f5;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

#view-transactions .transaction-compact-row:last-child { border-bottom: 0; }

#view-transactions .transaction-compact-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 10px;
  min-height: 84px;
  padding: 11px 10px 11px 12px;
  background: #fff;
  transition: transform .22s ease, background .18s ease;
}

#view-transactions .transaction-compact-row:active .transaction-compact-content {
  background: #f8fbfd;
}

#view-transactions .transaction-compact-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--page-accent-soft);
  color: var(--page-accent);
  display: grid;
  place-items: center;
}

#view-transactions .transaction-compact-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#view-transactions .transaction-compact-copy > strong {
  min-width: 0;
  font-size: .92rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-transactions .transaction-compact-copy > small {
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-transactions .transaction-compact-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  margin-top: 2px;
}

#view-transactions .compact-pill {
  max-width: 150px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(15, 23, 42, .07);
  border-radius: 999px;
  background: #f7f9fb;
  color: #516173;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .66rem;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

#view-transactions .compact-pill i { font-size: .88rem; flex: 0 0 auto; }
#view-transactions .compact-pill.info { color: #0b5c9e; background: rgba(15,122,214,.08); }
#view-transactions .compact-pill.success { color: #047857; background: rgba(5,150,105,.09); }
#view-transactions .compact-pill.warning { color: #a16207; background: rgba(245,158,11,.12); }
#view-transactions .compact-pill.user { max-width: 170px; }

#view-transactions .transaction-compact-value {
  min-width: 78px;
  display: grid;
  justify-items: end;
  gap: 5px;
}

#view-transactions .transaction-compact-value > strong {
  font-size: .92rem;
  line-height: 1;
  white-space: nowrap;
}

#view-transactions .transaction-compact-value .status-pill {
  min-height: 24px;
  padding: 4px 8px;
  font-size: .64rem;
}

#view-transactions .transaction-compact-row .more-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 0;
  background: transparent;
}

#view-transactions .transaction-compact-row.needs-review {
  box-shadow: inset 3px 0 0 #e0a128;
}

#view-transactions .transaction-compact-row.payment-awaiting {
  box-shadow: inset 3px 0 0 #f59e0b;
}

@media (max-width: 390px) {
  #view-transactions .transaction-compact-content {
    grid-template-columns: 38px minmax(0, 1fr) auto 30px;
    gap: 8px;
    padding-inline: 9px 6px;
  }

  #view-transactions .transaction-compact-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  #view-transactions .transaction-compact-value { min-width: 68px; }
  #view-transactions .transaction-compact-value > strong { font-size: .84rem; }
  #view-transactions .compact-pill.user { display: none; }
}

/* v1.7.0 — distinção visual de à vista/parcelado e filtros ampliados */
body[data-active-view="transactions"] .topbar {
  background: linear-gradient(180deg, #eef5fb 0%, #ffffff 92%);
  border-bottom-color: rgba(21,95,146,.22);
  box-shadow: inset 0 3px 0 #155f92;
}
body[data-active-view="transactions"] .topbar-period-main,
body[data-active-view="transactions"] .topbar-total-btn { color:#155f92; }
body[data-active-view="transactions"] .bottom-nav.raised-dock { --dock-accent:#155f92; }
body[data-active-view="transactions"] .sidebar .nav-item.active { color:#155f92; background:rgba(21,95,146,.10); }

#view-transactions .filters-panel { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.transaction-compact-row.purchase-installment { border-left: 4px solid #5d61c9; }
.transaction-compact-row.purchase-cash { border-left: 4px solid #138168; }
.compact-pill.installment-pill { background:rgba(93,97,201,.10); color:#5458b7; border-color:rgba(93,97,201,.18); }
.compact-pill.cash-pill { background:rgba(19,129,104,.10); color:#0f745f; border-color:rgba(19,129,104,.18); }
