/* ==========================================================================
   Kerrindale Rural Finance — brand override
   app.css supplies every component. Load AFTER app.css.
   ========================================================================== */

:root {
  --brand:      #47501f;   /* olive — the eighth distinct client identity */
  --brand-deep: #333a14;
  --brand-tint: #eff1e3;
  --brass:      #d08a2e;   /* harvest */
}

.avatar.brass { background: #fbead2; color: #7d4f10; }

/* --------------------------------------------------------------------------
   Group tree — a farming client is not a borrower, it is a family group.
   Entities indent under the group; each carries what it owns and what it owes.
   -------------------------------------------------------------------------- */

.grouptree { border-top: 1px solid var(--line-soft); }

.gnode {
  display: grid;
  grid-template-columns: 1fr 148px 132px 108px;
  gap: 14px;
  align-items: center;
  padding: 11px 0 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.gnode:last-child { border-bottom: 0; }
.gnode .g-name { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.gnode .g-sub { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.gnode.lvl2 { padding-left: 26px; }
.gnode.lvl3 { padding-left: 52px; }

.gnode .g-kind {
  flex: none;
  font: 500 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--brand-tint);
  color: var(--brand);
}

.gnode .g-kind.person { background: #fbead2; color: #7d4f10; }
.gnode .g-kind.trust  { background: #e7f0fb; color: #1c5cab; }
.gnode .g-num { font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; }

/* Guarantee links, drawn as text rather than lines — a farm group is a list,
   not a diagram, and a list is what a credit analyst actually reads. */
.gnode .g-role { font-size: 11.5px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Backwards plan — the season date is fixed and everything is derived from it
   -------------------------------------------------------------------------- */

.backplan { display: flex; flex-direction: column; gap: 2px; }

.bstep {
  display: grid;
  grid-template-columns: 96px 1fr 92px;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  background: var(--sunken);
  border-left: 3px solid var(--line);
  font-size: 13px;
}

.bstep:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.bstep:last-child  { border-radius: 0 0 var(--radius) var(--radius); }
.bstep .b-date { font: 600 12.5px var(--mono); font-variant-numeric: tabular-nums; }
.bstep .b-what b { display: block; font-weight: 600; }
.bstep .b-what span { font-size: 11.5px; color: var(--ink-3); }
.bstep .b-float { font: 600 12px var(--mono); text-align: right; font-variant-numeric: tabular-nums; }

.bstep.fixed { background: var(--brand); color: #fff; border-left-color: var(--brass); }
.bstep.fixed .b-what span, .bstep.fixed .b-float { color: rgba(255,255,255,.72); }
.bstep.done { border-left-color: var(--good); }
.bstep.done .b-float { color: #0a6b0a; }
.bstep.late { border-left-color: var(--critical); background: #fff8f8; }
.bstep.late .b-float { color: #9e2b2b; }
.bstep.tight { border-left-color: var(--warning); background: #fffdf6; }
.bstep.tight .b-float { color: #8a6008; }
