:root { --pico-font-size: 95%; }

.table-wrap { overflow-x: auto; }
.num { text-align: right; white-space: nowrap; }
.muted { color: var(--pico-muted-color); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
#stats { margin-bottom: 2rem; }
.money-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.money-row article > strong { font-size: 2.2rem; }
.stats article { margin: 0; padding: 1rem; display: flex; flex-direction: column; gap: .25rem; }
.stats article > strong { font-size: 1.8rem; line-height: 1; }
.warn { color: #c77700; }
.danger { color: #d93526; }

/* Documente */
#doc-list:has(tr[data-doc]) .empty-row { display: none; }
.editable { cursor: pointer; text-decoration: underline dotted; }
.editing input { margin: 0; padding: .25rem .5rem; height: auto; }
.actions { white-space: nowrap; text-align: right; }
button.small { padding: .2rem .6rem; font-size: .8rem; margin: 0 0 0 .25rem; width: auto; }

.badge, .status { font-size: .75rem; padding: .1rem .5rem; border-radius: 1rem; white-space: nowrap; }
.badge.invoice { background: #e3effd; color: #1a5fb4; }
.badge.receipt { background: #e6f6ea; color: #26803a; }
.badge.unmatched { background: #fde8e6; color: #9b1c12; cursor: help; }
.status.pending { background: #fff1d6; color: #9a5b00; }
.status.confirmed { background: #e6f6ea; color: #26803a; }

/* Stoc */
tr.negative td { color: #d93526; }

/* Erori */
.flash { background: #fde8e6; color: #9b1c12; border: 1px solid #f3b5ae; padding: .75rem 1rem; border-radius: var(--pico-border-radius); margin-bottom: 1rem; display: flex; justify-content: space-between; }
.flash .close { color: inherit; text-decoration: none; font-weight: bold; }

/* Mișcări & rețete */
#movements:not(:empty) { margin-top: 1.5rem; }
.pos { color: #26803a; }
.neg { color: #d93526; }
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.recipes article { margin: 0; }
.recipes header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.recipes table { margin: 0; }
