input[type="search"], input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
}
input[type="date"] { width: auto; }
.hidden { display: none !important; }
.tile-hero { background: var(--dark); border-color: var(--dark); }
.tile-hero .tile-label, .tile-hero .tile-note { color: var(--on-dark-soft); }
.tile-hero .tile-value { color: var(--lime); }
.tile-bad .tile-value { color: var(--bad); }
.filters { display: flex; flex-direction: column; gap: 10px; }
.filter-selects select { width: auto; min-width: 160px; }
.filter-dates { gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bar-click { background: none; border: 0; padding: 2px 0; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.bar-click:hover .bar-row-label span:first-child { text-decoration: underline; }
.split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.split i { display: block; height: 12px; }
.split-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.dot-color { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
td.num { text-align: right; white-space: nowrap; font-weight: 650; }
.tx-list, .import-list, .acc-list, .cat-list, .member-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tx-row, .import-row, .acc-row, .cat-row, .member-row { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.tx-row:first-child, .import-row:first-child, .acc-row:first-child, .cat-row:first-child, .member-row:first-child { border-top: 0; }
.tx-row { align-items: flex-start; }
.tx-date { flex: none; width: 64px; font-size: 13px; color: var(--ink-soft); padding-top: 2px; }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tx-desc { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-meta { gap: 6px; }
.tx-cat { width: auto; max-width: 260px; padding: 4px 8px; font-size: 13px; }
.tx-amount { flex: none; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tx-amount .faint { font-weight: 400; font-size: 12px; }
.tx-amount.plus { color: var(--ok); }
.tx-amount.transfer { color: var(--ink-soft); }
.tx-del { padding: 2px 8px; opacity: .5; }
.tx-row:hover .tx-del { opacity: 1; }
.import-row { justify-content: space-between; align-items: flex-start; }
.import-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.check-ok { color: var(--ok); font-size: 14px; }
.acc-row > div:first-child { flex: 1; }
.acc-row select { width: auto; }
.cat-emoji { font-size: 20px; width: 28px; text-align: center; }
.cat-add .emoji-input { flex: 0 0 64px; text-align: center; }
.cat-add select { flex: 0 0 140px; }
.member-row input[type="color"] { flex: none; }
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 32px 20px; text-align: center; cursor: pointer; background: var(--surface); }
.dropzone.over, .dropzone:hover { border-color: var(--ink-soft); background: var(--surface-2); }
.dropzone p { margin: 6px 0 0; }
.setup-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.setup-steps li.done b { color: var(--ok); }
.setup-steps p { margin: 2px 0 0; }
.danger p.muted { margin: 4px 0 0; }
body.miniapp .page { padding: 12px 12px 60px; }
body.miniapp .tabs { margin-bottom: 14px; }
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
  .tx-date { width: 52px; }
  .import-row, .acc-row, .cat-row { flex-wrap: wrap; }
  .filter-selects select { min-width: 0; flex: 1; }
}
