/* Money → Pots, Projects and Rules. Builds on the shared styles in style.css. */

.back-link { align-self: flex-start; font-weight: 600; font-size: 0.92rem; padding: 4px 0; margin-bottom: -6px; }

/* Pots */
.pots-summary .notice { margin: 6px 0 0; }
.budget-group-sum { font-variant-numeric: tabular-nums; font-weight: 600; }
.budget-row { color: var(--text); }
.budget-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.budget-meta .tag { font-size: 0.7rem; }
.banner { text-decoration: none; }
.pot-row.pot-sub { padding-left: 32px; }
.pot-row.pot-sub::before { left: 14px; }
.pot-cover { margin-left: auto; min-height: 30px; padding: 4px 12px; }
.struck { text-decoration: line-through; opacity: 0.7; }

/* Categories */
.cat-row { display: flex; align-items: center; gap: 2px; padding: 0 8px 0 4px; border-bottom: 1px solid var(--border); }
.cat-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 6px;
  border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--text); border-radius: 10px;
}
.cat-main:active { background: var(--surface-2); }
.cat-row .rule-order .icon-btn { min-width: 34px; }
.collapsible { display: flex; flex-direction: column; gap: 8px; }
.collapsible > summary { font-weight: 600; padding: 10px 2px; }
.collapsible > .card { margin-top: 4px; }
.cat-name-row { flex-wrap: nowrap; align-items: flex-start; }
.cat-preview { display: flex; align-items: center; gap: 6px; }
.hint-line { margin: -8px 0 0; }
.palette { margin: 0; }

/* Projects */
a.budget-row { text-decoration: none; }
.project-row { padding-left: 16px; }
.project-row::before { display: none; }
.project-row .bar { margin-top: 8px; }
.project-description { margin: -4px 0 0; white-space: pre-wrap; }
.add-mark {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.list-row:disabled { opacity: 0.6; }
.page-header h1 { overflow-wrap: anywhere; }

/* Rules */
.rule-main-pad { padding-left: 10px; }
.rule-main { color: var(--text); }
.rule-row .switch { margin-left: 4px; }
.preview-list { max-height: none; }
.preview-list .list-row { min-height: 48px; }
.condition-top .icon-btn { flex: none; }
.form .conditions { margin: 4px 0; }
.form .field-row { margin: 4px 0; }
.form .preview { margin-top: 4px; }

/* Categories inside others, in the tree. */
.cat-row.cat-sub .cat-main { min-height: 52px; }
.swatch-inherit {
  background: var(--surface-2); color: var(--muted); font-weight: 700; display: inline-flex; align-items: center;
  justify-content: center; border: 3px dashed var(--border);
}
.swatch-inherit.selected { border-style: solid; border-color: var(--text); }
.segmented button:disabled { opacity: 0.5; cursor: default; }

/* Rules placeholder: rows shaped like the real ones. */
.skel-order .icon-btn { visibility: hidden; }
.skel-switch { border-radius: 999px; }
.skel-summary-line { font-weight: 600; padding: 10px 2px; }

