/* gl-control: dashboard, report centre, cases, branches/cost centres, audit trail */
.glc { display: flex; flex-direction: column; gap: 14px; }
.glc .num { font-variant-numeric: tabular-nums; }
.glc-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.glc-kpi { display: flex; flex-direction: column; gap: 4px; text-align: start; padding: 12px 14px; border: 1px solid var(--bo-line); border-radius: var(--bo-r-sm, 8px); background: var(--bo-surface, #fff); font: inherit; color: var(--bo-ink); transition: border-color .15s, box-shadow .15s; }
button.glc-kpi { cursor: pointer; }
button.glc-kpi:hover, button.glc-kpi:focus-visible { border-color: var(--bo-blue); box-shadow: 0 2px 8px rgb(0 0 0 / .06); outline: none; }
.glc-kpi__l { font-size: .82rem; color: var(--bo-muted); }
.glc-kpi__v { font-size: 1.25rem; font-weight: 700; }
.glc-kpi__s { font-size: .75rem; color: var(--bo-muted); min-height: 1em; }
.glc-kpi--neg .glc-kpi__v { color: var(--bo-red); }
.glc-kpis--sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.glc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.glc-box { border: 1px solid var(--bo-line); border-radius: var(--bo-r-sm, 8px); background: var(--bo-surface, #fff); padding: 12px 14px; min-width: 0; }
.glc-box h3 { margin: 0 0 10px; font-size: .95rem; }
.glc-box--wide { grid-column: 1 / -1; }
.glc-chart { width: 100%; height: auto; max-height: 240px; }
.glc-chart text { font-size: 10px; fill: var(--bo-muted); }
.glc-b1 { fill: var(--bo-blue, #2563eb); background: var(--bo-blue, #2563eb); }
.glc-b2 { fill: var(--bo-orange, var(--orange)); background: var(--bo-orange, var(--orange)); }
.glc-leg { display: flex; gap: 16px; font-size: .8rem; color: var(--bo-muted); }
.glc-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 6px; }
.glc-custom { display: inline-flex; gap: 8px; align-items: end; }
.glc-custom[hidden] { display: none; }

/* report centre */
.glc-rc { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 12px; align-items: start; }
.glc-rc > .glc-cats { grid-column: 1; grid-row: 1; flex-direction: row; flex-wrap: wrap; max-height: none; }
.glc-rc > .glc-cats .glc-cat { flex: 1 1 45%; }
.glc-rc > .glc-reps { grid-column: 1; grid-row: 2; max-height: 60vh; }
.glc-rc > .glc-out { grid-column: 2; grid-row: 1 / span 2; }
.glc-box .dt { min-width: 0; width: 100%; }
.glc-box { overflow-x: auto; }
.glc-cats, .glc-reps { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--bo-line); border-radius: var(--bo-r-sm, 8px); background: var(--bo-surface, #fff); padding: 6px; max-height: 75vh; overflow: auto; }
.glc-cat, .glc-rep { display: flex; justify-content: space-between; gap: 8px; text-align: start; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; color: var(--bo-ink); cursor: pointer; transition: background .15s; }
.glc-cat b { font-size: .75rem; color: var(--bo-muted); }
.glc-cat:hover, .glc-rep:hover { background: var(--bo-bg); }
.glc-cat.on, .glc-rep.on { background: var(--bo-bg); font-weight: 700; color: var(--bo-blue); }
.glc-rep { font-size: .88rem; }
.glc-out { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.glc-out tfoot td { font-weight: 700; border-top: 2px solid var(--bo-line); }
.glc-bold td { font-weight: 700; }
.glc-ptitle { display: none; }

/* cases / audit */
.glc-sev--high { background: #fde8e8; color: #b42318; }
.glc-sev--medium { background: #fff4e5; color: #b54708; }
.glc-sev--low { background: #eef4ff; color: #3538cd; }
.glc-open { background: #e8f5ee; color: #067647; }
.glc-note { padding: 10px 14px; border-radius: var(--bo-r-sm, 8px); background: var(--bo-bg); border: 1px solid var(--bo-line); }
.glc-ok { background: #e8f5ee; border-color: #a6e3c0; color: #067647; }
.glc-bad { background: #fde8e8; border-color: #f5b5b5; color: #b42318; }
.glc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; }
.glc-detail { white-space: pre-wrap; background: var(--bo-bg); padding: 8px 10px; border-radius: 6px; }
.glc-notes { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; }
.glc-n { border-inline-start: 3px solid var(--bo-line); padding-inline-start: 8px; }
.glc-n p { margin: 2px 0 0; white-space: pre-wrap; }
.glc-err { color: var(--bo-red); min-height: 1em; margin: 0; }
.glc-chk { display: flex; gap: 6px; align-items: center; }
.glc-acts { white-space: nowrap; }
.glc-trunc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glc-json { background: var(--bo-bg); padding: 10px; border-radius: 6px; max-height: 50vh; overflow: auto; font-size: .8rem; white-space: pre-wrap; word-break: break-word; }
.glc-hash { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--bo-muted); word-break: break-all; }

@media (max-width: 900px) {
  .glc-grid { grid-template-columns: 1fr; }
  .glc-rc { grid-template-columns: 1fr; grid-template-rows: none; }
  .glc-rc > .glc-cats, .glc-rc > .glc-reps, .glc-rc > .glc-out { grid-column: 1; grid-row: auto; }
  .glc-cats { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .glc-reps { max-height: 220px; }
}
@media print {
  body.glc-printing * { visibility: hidden; }
  body.glc-printing .glc-print, body.glc-printing .glc-print * { visibility: visible; }
  body.glc-printing .glc-print { position: absolute; inset: 0 0 auto 0; }
  body.glc-printing .glc-ptitle { display: block; }
}
