/* ---------------------------------------------------------------------------
 * RMF Build Up Tool — thin theme layer on top of Bootstrap 5.
 * Bootstrap handles the heavy lifting; this only adds the brand accent and the
 * build-up table's coloured summary rows that Bootstrap has no component for.
 * ------------------------------------------------------------------------- */

:root {
  --rmf-navy: #0f1b2d;
  --rmf-blue: #1f6feb;
}

/* ---- left sidebar ---- */
.app-sidebar {
  background-color: var(--rmf-navy);
  width: 240px;
}
.app-brand {
  letter-spacing: .3px;
  font-size: 17px;
}
.app-sidebar .nav-link {
  color: #aeb9c7;
  font-weight: 600;
}
.app-sidebar .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, .08);
}
.app-sidebar .nav-link.active {
  background-color: var(--rmf-blue);
  color: #fff !important;
}
.app-main {
  max-width: 1080px;
}
@media (max-width: 767.98px) {
  .app-sidebar { width: 100%; }
}

/* ---- numeric table cells ---- */
.table .num,
td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- key / value detail list ---- */
.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 28px;
  margin: 0;
}
.kv .row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed #e3e8ee;
  padding: 7px 0;
}
.kv .row .k { color: #6b7785; }
.kv .row .v { font-weight: 600; text-align: right; }
@media (max-width: 680px) { .kv { grid-template-columns: 1fr; } }

/* ---- RAF tab grid (spreadsheet A1:D13 reproduction) ---- */
.raf-grid { font-size: 14px; }
.raf-grid td, .raf-grid th { padding: .4rem .55rem; vertical-align: middle; }
.raf-grid .raf-lbl {
  background: #f6f8fb;
  color: #39434f;
  font-weight: 600;
  white-space: nowrap;
  width: 22%;
}
.raf-grid .raf-hd {
  background: #eef3f9;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #6b7785;
  text-align: center;
}
.raf-grid input.raf-calc {
  background: #f1f4f8;
  font-weight: 600;
  color: #1c2430;
}

/* ---- section heading above each build-up table ---- */
.section-head {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--rmf-blue);
  font-weight: 700;
  margin: 26px 0 10px;
}

/* ---- build-up table coloured summary rows ---- */
.buildup tr.sub > * {
  background: #f3f6fa;
  font-weight: 700;
}
.buildup tr.total > * {
  background: var(--rmf-navy);
  color: #fff;
  font-weight: 700;
}
.buildup tr.grand > * {
  background: var(--rmf-blue);
  color: #fff;
  font-weight: 700;
}
.buildup tr.total a,
.buildup tr.grand a { color: #fff; }
