/* Ledger interaction details. Load after module-refresh.css. */
.ledger-page .ledger-records-context {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 14px;
  margin: -10px 0 16px;
  color: var(--module-muted, #706d61);
  font-size: 12px;
  line-height: 1.8;
}
.ledger-page .ledger-records-context > span {
  color: var(--module-accent, #53664e);
  font-variant-numeric: tabular-nums;
}
.ledger-page .ledger-filters { margin-bottom: 8px; }
.ledger-page .ledger-search { padding-right: 4px; }
.ledger-page .ledger-search button {
  flex: none;
  min-width: 48px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--module-accent, #53664e);
  background: #eef2e6;
  font-size: 12px;
  line-height: 1.5;
}
.ledger-page .ledger-search button:hover { background: #e2e9d7; }
.ledger-page .ledger-search:focus-within {
  border-color: #889b75;
  box-shadow: 0 0 0 2px #dfe8d2;
}
.ledger-page .ledger-search-help {
  margin: 0 0 17px;
  color: var(--module-muted, #706d61);
  font-size: 11px;
  line-height: 1.75;
}
.ledger-page .ledger-filter-hint {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 9px 12px;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #dce3d1;
  border-radius: 10px;
  background: #f4f6ee;
}
.ledger-page .ledger-filter-chips {
  display: flex;
  flex: 1 1 210px;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.ledger-page .ledger-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 10px;
  margin: 0;
  border: 1px solid #d4ddc8;
  border-radius: 7px;
  color: #4d6141;
  background: var(--module-paper, #fffef9);
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  text-decoration: none;
}
.ledger-page .ledger-filter-chip > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ledger-page .ledger-filter-chip > span:last-child {
  flex: none;
  font-size: 16px;
  line-height: 1;
  color: #697d5c;
}
.ledger-page .ledger-filter-chip:hover { border-color: #9dae8e; background: #eaf0df; }
.ledger-page .ledger-clear-all {
  flex: none;
  min-height: 34px;
  padding: 6px 2px;
  margin: 0;
  color: var(--module-accent, #53664e);
  font-size: 12px;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ledger-page .ledger-empty p { overflow-wrap: anywhere; }
.ledger-page :is(button, input, select):focus-visible,
.ledger-entry-form :is(button, input, select, textarea):focus-visible {
  outline: 2px solid #6b8359;
  outline-offset: 3px;
}
.ledger-entry-form .ledger-entry-context {
  margin: 0 0 16px;
  padding: 9px 12px;
  border: 1px solid #dce3d1;
  border-radius: 8px;
  background: #f4f6ee;
  color: #5f7051;
  font-size: 12px;
  line-height: 1.8;
}
.ledger-entry-form .ledger-form-help[data-state="valid"] { color: #536b44; }
.ledger-entry-form .ledger-form-help[data-state="error"] { color: #a4523c; }
.ledger-entry-form .ledger-amount-field:has(input[aria-invalid="true"]) > div {
  border-color: #b66b54;
  box-shadow: 0 2px 0 #b66b5426;
}
.ledger-entry-form[aria-busy="true"] .dialog-actions button[type="submit"] { cursor: progress; }
@media (max-width: 760px), (pointer: coarse) {
  .ledger-page .ledger-search button,
  .ledger-page .ledger-filter-chip,
  .ledger-page .ledger-clear-all { min-height: 44px; }
  .ledger-page .ledger-search button { min-width: 52px; }
}
@media (max-width: 480px) {
  .ledger-page .ledger-records-context { margin-top: -7px; }
  .ledger-page .ledger-filter-hint { padding: 10px; gap: 8px; }
  .ledger-page .ledger-filter-chips { flex-basis: 100%; }
  .ledger-page .ledger-clear-all { padding-inline: 4px; }
  .ledger-page .ledger-search-help { font-size: 11px; }
}
