
.badge { padding: 1px 6px; border-radius: 9px; font-size: 11px; white-space: nowrap; background: #e4e7eb; }
.b-Open, .vs-WaitingForApproval { background: #fff0b3; }
.b-Inprogress { background: #d4ecd0; }
.b-OnHold { background: #fbd9b5; }
.b-Completed, .vs-Approved { background: #cfe2f3; }
.b-Cancelled, .vs-Rejected { background: #f4cccc; }

table.tbl { border-collapse: collapse; width: 100%; font-size: 12px; background: #fff; }
table.tbl th, table.tbl td { border: 1px solid #e5e8ec; padding: 3px 7px; text-align: left; }
table.tbl th { background: #eef2f7; position: sticky; top: 0; }
table.tbl.num td:not(:first-child) { text-align: right; }
table.tbl tr.neg td { background: #fde7e7; }
table.tbl tr.tot td, table.tbl tr.cur td { font-weight: 700; background: #fff8dc; }
.tag { background: #e8eef7; border-radius: 3px; padding: 1px 6px; display: inline-block; margin: 1px 0; }

.kpi-cards { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 8px 18px; min-width: 130px; }
.kpi span { display: block; color: var(--muted); }
.kpi b { font-size: 26px; }
.kpi.warn b { color: #b8860b; } .kpi.ok b { color: var(--ok); } .kpi.bad b { color: var(--danger); }

/* dialog + forms */
dialog { border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; min-width: 460px; max-width: 94vw; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog h3 { margin-top: 0; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.form-grid label, dialog label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input[type=checkbox], .pick input { width: auto; }
.lbl { font-size: 12px; margin-bottom: 2px; }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px 8px; margin-bottom: 8px; }
label.pick { flex-direction: row !important; align-items: center; gap: 4px !important; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.grow { flex: 1; }
.calc { background: #eef2f7; padding: 6px 8px; border-radius: 3px; }

/* KPI Dashboard: three columns like the Excel sheet */
.kpi-sheet { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.kcol { display: flex; flex-direction: column; gap: 12px; min-width: 300px; flex: 1 1 320px; }
.kcol .card { margin-bottom: 0; }
.chk-ok { color: var(--ok); font-weight: 600; }
.chk-bad { color: var(--danger); font-weight: 600; }
.kpi-sheet td { color: #1F2933; }
.wk-red { color: #C00000; font-size: 15px; }
.chk-bad { background: #FFC7CE; color: #9C0006; padding: 0 5px; }
/* colours = the cell fills of the Excel sheet "Dashboard" */
.kpi-sheet table.tbl th { background: #D9D9D9; color: #1F2933; font-weight: 400; position: static; }
.kpi-sheet table.tbl th.gray { background: #BFBFBF; font-weight: 700; }
.kpi-sheet table.tbl th.cyan { background: #B7DEE8; }
.kpi-sheet h2.kh { background: #BFBFBF; color: #1F2933; margin: -10px -12px 8px; padding: 6px 12px; border-radius: 4px 4px 0 0; }
.kpi-sheet h2.kh2 { background: #B7DEE8; }
.kpi-sheet table.tbl tr.tot td { background: transparent; font-weight: 400; }
.kpi-label { background: #D9D9D9; font-weight: 700; padding: 3px 8px; border-radius: 3px; }
.kpi-sheet table.tbl th.red { background: transparent; color: #C00000; font-weight: 700; }
