/* KeyLee job pages. Chart colours follow the validated reference palette (dataviz skill, checked 2026-11-16 on #ffffff):
   one hue (blue) for magnitude; blue / red for under / over budget, gray midpoint; status colours only with an icon + label. */
.jp {
  --series-1: #2a78d6;          /* magnitude / "under budget" */
  --track: #cde2fb;             /* meter track: lighter step of the same blue ramp */
  --over: #e34948;              /* over budget (diverging warm pole) */
  --mid: #f0efec;               /* diverging midpoint */
  --grid: #e1e0d9; --axis: #c3c2b7;
  --text-2: #52514e; --text-3: #898781;
  --warn: #fab219; --crit: #d03b3b; --good-text: #006300;
}
.jp-main { display: flex; height: calc(100vh - 52px); }
.jp-list { width: 300px; flex: none; overflow: auto; border-right: 1px solid var(--line); background: #fbfcfd; }
.jp-page { flex: 1; overflow: auto; padding: 14px 22px 60px; }
.jl-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 9px 12px; background: none; }
.jl-item:hover { background: #f0f3f6; }
.jl-item.on { background: #e9f4ff; color: var(--ink); box-shadow: inset 4px 0 0 var(--series-1); }
.jl-item .c { font-weight: 700; } .jl-item .t { color: var(--text-2); font-size: 12px; }
.jl-item .m { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 11px; color: var(--text-3); }
.meter { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; flex: 1; }
.meter i { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }
.meter.tall { height: 10px; border-radius: 5px; } .meter.tall i { border-radius: 5px; }

.jp-h1 { font-size: 20px; margin: 4px 0 2px; } .jp-h1 small { font-weight: 400; color: var(--text-2); font-size: 14px; }
.jp-sub { color: var(--text-2); margin-bottom: 10px; }
.chip2 { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: #eef2f6; color: #4a5866; margin-right: 6px; }
.stale { display: inline-flex; gap: 4px; align-items: center; font-size: 11px; color: #6a5300; background: #fff4d6; border-radius: 10px; padding: 1px 7px; }
.stale::before { content: "\26A0"; color: #b07a00; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; }
.tile .l { font-size: 12px; color: var(--text-2); } .tile .v { font-size: 22px; font-weight: 600; margin: 2px 0; }
.tile .s { font-size: 11px; color: var(--text-3); }
.sec { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.sec h2 { font-size: 15px; margin: 0 0 2px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sec .src { font-size: 11px; color: var(--text-3); font-weight: 400; }
.sec .lock { font-size: 12px; color: var(--text-3); }
.missing { background: #f7f8fa; border: 1px dashed var(--axis); border-radius: 8px; padding: 10px 12px; color: var(--text-2); }
table.jt { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12px; }
table.jt th { text-align: left; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--axis); padding: 5px 6px; vertical-align: bottom; }
table.jt td { border-bottom: 1px solid var(--grid); padding: 5px 6px; vertical-align: top; }
table.jt td.n, table.jt th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.jt tr.total td { font-weight: 700; border-top: 1px solid var(--axis); }
.var { position: relative; width: 140px; height: 14px; }
.var .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--axis); }
.var i { position: absolute; top: 3px; height: 8px; }
.var i.under { left: 50%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.var i.over { right: 50%; background: var(--over); border-radius: 4px 0 0 4px; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--text-2); margin: 2px 0 4px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.bars { margin: 8px 0; }
.bar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 8px; align-items: center; font-size: 12px; margin: 3px 0; }
.bar .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.bar .trk { height: 14px; position: relative; }
.bar .trk i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar .val { font-variant-numeric: tabular-nums; }
.doc-folder { border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; }
.doc-folder > summary { padding: 7px 10px; cursor: pointer; font-weight: 600; }
.doc-folder > summary .muted { font-weight: 400; }
.doc-row { display: grid; grid-template-columns: 1fr 80px 90px auto; gap: 8px; padding: 4px 10px; border-top: 1px solid var(--grid); font-size: 12px; }
.doc-row .p { color: var(--text-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-search { width: 100%; max-width: 380px; padding: 6px 8px; border: 1px solid #c9d1da; border-radius: 6px; margin: 6px 0; }
.jp-tip { position: fixed; z-index: 300; background: #1d2733; color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; pointer-events: none; max-width: 320px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
/* OneDrive (read-only): Open buttons show only when the connection is set up and this job's folder path is known */
.open-doc { display: none; font-size: 11px; padding: 1px 9px; border-radius: 10px; }
.drive-on .open-doc { display: inline-block; }
.open-cell { width: 56px; }
.linkish { font-size: 11px; padding: 0 7px; margin-left: 4px; }
@media (max-width: 900px) {
  .jp-main { flex-direction: column; height: auto; }
  .jp-list { width: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .jp-page { padding: 12px; }
  .cols2 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 100px 1fr 80px; }
  .var { width: 80px; }
}
