/* Management accounts on the Accounts beep (26 Nov, after the mock-up 'Cash flow and management accounts' Part 2).
   Panel tokens only; amber only for what the server marked adverse and material. */
.mg-head { align-items: center; }
.mg-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.mg-pill { font: 600 14px/1.2 var(--sans); padding: 10px 14px; min-height: 44px; border: 1px solid var(--case-edge); border-radius: 10px; background: var(--key); color: var(--lcd-text); cursor: pointer; text-align: left; }
.mg-pill small { font-weight: 500; color: var(--lcd-dim); }
.mg-pill.on { background: #e8f3e9; border-color: #8fbf98; box-shadow: inset 0 0 0 1px #8fbf98; }
.mg-pill:focus-visible, .mg-opt input:focus-visible + span { outline: 2px solid var(--lcd-glow); outline-offset: 2px; }
.mg-earlier { font: 500 14px var(--sans); padding: 9px 10px; min-height: 44px; border: 1px solid var(--case-edge); border-radius: 10px; background: var(--key); color: var(--lcd-text); }
.mg-verdict { margin: 6px 0 2px; font-size: 20px; text-wrap: balance; }
.mg-meta { margin: 0 0 14px 20px; }
.notice.mg-amber { background: var(--warn-bg); border-color: var(--warn-edge); color: var(--warn-ink); }
.mg-missing { display: grid; gap: 6px; justify-items: start; border: 1px dashed var(--case-edge); border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; color: var(--lcd-soft); }
.mg-missing b { color: var(--lcd-text); }
.mg-pack { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; font-size: 14px; color: var(--lcd-soft); }
.doc-pill.ok { background: #eaf4ec; border-color: #cfe6d4; color: var(--ok-ink); }
.mg-moved { background: var(--lcd-raised); border: 1px solid var(--lcd-rule); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--lcd-text); }
.mg-moved p { margin: 0 0 8px; }
.mg-moved .mg-by { margin: 4px 0 0; font-size: 12.5px; color: var(--lcd-dim); }
.mg-moved .ref-chip { margin: 0 2px; padding: 1px 6px; font-size: 12px; }
.mg-edit { display: grid; gap: 8px; }
.mg-edit textarea { width: 100%; font: 400 15px/1.5 var(--sans); padding: 10px; border: 1px solid var(--case-edge); border-radius: 8px; background: var(--lcd); color: var(--lcd-text); resize: vertical; }
.mg-edit small { font-weight: 400; color: var(--lcd-dim); }
.mg-msg { font-size: 13px; color: var(--lcd-dim); }
.mg-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--lcd-rule); border-bottom: 1px solid var(--lcd-rule); margin: 0 0 12px; }
.mg-kpi { padding: 12px 14px 12px 0; display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-content: start; min-width: 0; }
.mg-kpi + .mg-kpi { border-left: 1px solid var(--lcd-rule); padding-left: 14px; }
.mg-kpi .led { width: 8px; height: 8px; align-self: center; }
.mg-kpi .l { font-size: 13.5px; color: var(--lcd-soft); grid-column: 2; }
.mg-kpi .led + .l { grid-column: 2; }
.mg-kpi b, .mg-kpi .s { grid-column: 1 / -1; }
.mg-kpi b { font: 700 30px/1.1 var(--cond); font-variant-numeric: tabular-nums; color: var(--lcd-text); margin: 4px 0 2px; }
.mg-kpi .s { font-size: 13px; color: var(--lcd-dim); overflow-wrap: anywhere; }
.mg-tablewrap { overflow-x: auto; max-width: 100%; }
.mg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.mg-table th, .mg-table td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--lcd-rule); white-space: nowrap; vertical-align: middle; }
.mg-table thead th { font: 700 12px/1.2 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--lcd-dim); border-bottom-color: var(--case-edge); }
.mg-table th:first-child { text-align: left; white-space: normal; font-weight: 500; }
.mg-table thead th:first-child { font-weight: 700; }
.mg-table tr.acc th, .mg-table tr.acc td { border-bottom-style: dashed; color: var(--lcd-soft); }
.mg-table tr.grp th, .mg-table tr.grp td, .mg-table tr.tot th, .mg-table tr.tot td { font-weight: 700; color: var(--lcd-text); }
.mg-table tr.tot th, .mg-table tr.tot td { border-top: 1.5px solid var(--lcd-text); border-bottom: 1px solid var(--lcd-rule); }
.mg-table tr.tot:last-child th, .mg-table tr.tot:last-child td { border-bottom: 3px double var(--lcd-text); }
.mg-table td.a { color: var(--warn-ink); font-weight: 700; }
.mg-table td.a small { display: block; font: 400 11.5px var(--sans); color: var(--lcd-dim); }
.mg-table .code, .mg-btable .code, .mg-list .code { font: 400 12.5px var(--mono); color: var(--lcd-dim); }
.mg-foot { margin: 10px 0 18px; font-size: 13px; color: var(--lcd-dim); }
#log-inner .mg-page .meta2 { font-size: 13px; color: var(--lcd-dim); margin: 6px 0 0; }
#log-inner .mg-page .mg-meta { margin: 0 0 14px 20px; }
#log-inner .mg-page .mg-foot { margin: 10px 0 18px; }
.mg-box { margin: 0 0 18px; }
.mg-box .legend { margin: 0 0 8px; }
.mg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mg-list { list-style: none; margin: 0; padding: 0; }
.mg-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--lcd-rule); font-size: 14px; }
.mg-list li span { min-width: 0; overflow-wrap: anywhere; }
.mg-list li small { color: var(--lcd-dim); font-size: 12.5px; }
.mg-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mg-list li.t { font-weight: 700; border-bottom: 3px double var(--lcd-text); }
.mg-bars { display: grid; gap: 8px; }
.mg-bar { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 52px; gap: 12px; align-items: center; font-size: 14px; }
.mg-bar small { color: var(--lcd-dim); }
.mg-bar i { display: block; height: 10px; background: var(--lcd-rule); border-radius: 3px; overflow: hidden; }
.mg-bar i em { display: block; height: 100%; background: var(--me-ink); opacity: .7; }
.mg-bar b { text-align: right; font-variant-numeric: tabular-nums; }
/* settings */
.mg-set { display: grid; gap: 0; border-top: 1px solid var(--lcd-rule); }
.mg-srow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--lcd-rule); }
.mg-srow > b { font: 600 15px/1.4 var(--sans); color: var(--lcd-text); padding-top: 10px; }
.mg-srow .meta2 { margin: 8px 0 0; font-size: 13px; color: var(--lcd-dim); max-width: 70ch; }
.mg-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.mg-opt { position: relative; }
.mg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mg-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--case-edge); border-radius: 10px; background: var(--key); font: 500 14.5px var(--sans); color: var(--lcd-text); }
.mg-opt input:checked + span { background: #e8f3e9; border-color: #8fbf98; font-weight: 600; box-shadow: inset 0 0 0 1px #8fbf98; }
.mg-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 14.5px; color: var(--lcd-soft); }
.mg-inline input[type="number"] { width: 90px; }
.mg-inline input, .mg-inline select, .mg-gtable input, .mg-gtable select { font: 500 14.5px var(--sans); min-height: 40px; padding: 6px 10px; border: 1px solid var(--case-edge); border-radius: 8px; background: var(--lcd); color: var(--lcd-text); }
.mg-gtable { border-collapse: collapse; margin-top: 8px; }
.mg-gtable th { text-align: left; font: 700 12px var(--cond); letter-spacing: .1em; text-transform: uppercase; color: var(--lcd-dim); padding: 4px 8px 4px 0; }
.mg-gtable td { padding: 4px 8px 4px 0; }
.mg-gtable td:nth-child(3) input { width: 220px; }
.mg-start { margin: 0 0 12px; }
/* the budget grid */
.mg-bwrap { margin: 12px 0; border: 1px solid var(--lcd-rule); border-radius: 8px; }
.mg-btable { border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.mg-btable th, .mg-btable td { padding: 4px 6px; border-bottom: 1px solid var(--lcd-rule); text-align: right; white-space: nowrap; }
.mg-btable thead th { font: 700 12px var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--lcd-dim); position: sticky; top: 0; background: var(--lcd); }
.mg-btable th:first-child { text-align: left; position: sticky; left: 0; background: var(--lcd); min-width: 200px; max-width: 260px; white-space: normal; font-weight: 500; z-index: 1; }
.mg-btable tr.grp th { background: var(--lcd-raised); font-weight: 700; color: var(--lcd-text); }
.mg-btable input { width: 84px; font: 500 13.5px var(--sans); text-align: right; padding: 6px; border: 1px solid var(--lcd-rule); border-radius: 6px; background: var(--lcd); color: var(--lcd-text); }
.mg-btable td.t { font-weight: 700; }
@media (max-width: 760px) {
  .mg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .mg-kpi:nth-child(n+3) { border-top: 1px solid var(--lcd-rule); }
  .mg-two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .mg-srow { grid-template-columns: minmax(0, 1fr); }
  .mg-srow > b { padding-top: 0; }
  .mg-verdict { font-size: 18px; }
  .mg-meta { margin-left: 0; }
  .mg-table { font-size: 13.5px; }
  .mg-table th, .mg-table td { padding: 8px 6px; }
  .mg-bar { grid-template-columns: minmax(0, 1fr) 80px 44px; }
  .mg-gtable td:nth-child(3) input { width: 140px; }
}
.mg-page [hidden] { display: none !important; }
