:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #18202a;
  --muted: #667085;
  --line: #e5e7eb;
  --primary: #157347;
  --danger: #b42318;
  --warning: #b54708;
  --shadow: 0 8px 20px rgba(16,24,40,.08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
.topbar { background: #101828; color: #fff; padding: 16px 24px; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; }
.topbar a { color: #fff; opacity: .92; }
.muted { color: var(--muted); font-size: 13px; display: block; margin-top: 3px; }
.topbar .muted { color: #cbd5e1; }
.container { max-width: 1180px; margin: 24px auto; padding: 0 16px; }
.footer { text-align: center; color: var(--muted); padding: 24px; font-size: 13px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.form-row { margin-bottom: 12px; }
label { display: block; font-weight: bold; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 11px; border: 1px solid #d0d5dd; border-radius: 10px; font-size: 15px; background: #fff; }
textarea { min-height: 74px; resize: vertical; }
button, .button { display: inline-block; border: none; background: var(--primary); color: #fff; padding: 11px 15px; border-radius: 10px; font-weight: bold; cursor: pointer; }
button.secondary, .button.secondary { background: #344054; }
button.danger, .button.danger { background: var(--danger); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f9fafb; font-size: 13px; color: #344054; }
.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 12px; font-weight: bold; background: #eef4ff; color: #3538cd; }
.badge.open { background: #ecfdf3; color: #027a48; }
.badge.closed { background: #f2f4f7; color: #344054; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.alert-error { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.kpi { display: flex; flex-direction: column; gap: 5px; }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 24px; font-weight: bold; }
.diff-positive { color: var(--primary); font-weight: bold; }
.diff-negative { color: var(--danger); font-weight: bold; }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .topbar { align-items: flex-start; } }

.small { display: inline; font-size: 12px; }
.filter-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.table-wrap a { font-weight: bold; }
