/* V2.24 (Change Request Batch 11). Additions only. */
/* ---- A17: the PDF view ---- */
.pv11 { position: fixed; inset: 0; z-index: 4000; background: #3a4144; display: flex; flex-direction: column; color: #fff; }
.pv11-top { flex: none; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: #1d2427; border-bottom: 1px solid #000; font-size: 13px; white-space: nowrap; }
.pv11-ttl { max-width: 32vw; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pv11-pg input { width: 54px; height: 28px; background: #2b3336; color: #fff; border: 1px solid #4a5458; border-radius: 6px; text-align: center; padding: 0 2px; }
.pv11-ctl { display: inline-flex; align-items: center; gap: 4px; }
.pv11-b { height: 30px; min-width: 30px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.pv11-b svg { width: 16px; height: 16px; }
.pv11-b:hover, .pv11-b:focus-visible { background: rgba(255,255,255,.14); outline: none; border-color: rgba(255,255,255,.3); }
.pv11-b.on { background: rgba(80,216,144,.25); border-color: #50d890; }
.pv11-t { padding: 0 9px; }
.pv11-z { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
.pv11-body { flex: 1 1 auto; min-height: 0; display: flex; }
.pv11-stage { flex: 1 1 auto; min-width: 0; overflow: auto; outline: none; }
.pv11-pages { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 12px 24px; min-width: min-content; }
.pv11-page { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); position: relative; flex: none; overflow: hidden; }
.pv11-page canvas { width: 100%; height: 100%; display: block; }
.pv11-wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 7vw Arial, sans-serif; color: rgba(200,0,0,.16); transform: rotate(-30deg); pointer-events: none; white-space: nowrap; }
.pv11-load { color: #dfe6e4; padding: 40px 20px; }
.pv11-side { flex: none; width: clamp(200px, 15vw, 280px); background: var(--surface, #fff); color: var(--text, #1b2a33); overflow: auto; padding: 12px 14px; border-left: 1px solid #000; font-size: 13px; }
.pv11-side[hidden] { display: none; }
@media (max-width: 760px) { .pv11-ttl { max-width: 30vw; } .pv11-t { font-size: 0; gap: 0; padding: 0 6px; } .pv11-t svg { width: 18px; height: 18px; } .pv11-b.pv11-t[data-pv="fitw"], .pv11-b.pv11-t[data-pv="fitp"] { font-size: 11px; } .pv11-pg { display: none; } .pv11-side { position: absolute; right: 0; top: 40px; bottom: 0; width: 86vw; z-index: 2; } }
/* print preview: the pages get the window, the options are one compact bar */
.modal-bg.pv11-rpt { padding: 6px; align-items: stretch; overflow: hidden; }
.modal-bg.pv11-rpt .modal { width: 100% !important; max-width: none; height: 100%; max-height: none !important; min-height: 0; display: flex; flex-direction: column; }
.modal-bg.pv11-rpt .modal-h { padding: 2px 10px; flex: none; min-height: 0; }
.modal-bg.pv11-rpt .modal-h h2 { font-size: 14px; margin: 0; }
.modal-bg.pv11-rpt .modal-h .icon-btn { width: 28px; height: 28px; }
.modal-bg.pv11-rpt .modal-f .btn { min-height: 0; height: 30px; padding: 0 12px; font-size: 13px; }
.modal-bg.pv11-rpt .modal-f .modal-max { display: none; }
.modal-bg.pv11-rpt .modal-b { flex: 1 1 auto; min-height: 0; max-height: none; display: flex; flex-direction: column; padding: 4px 6px; overflow: hidden; }
.modal-bg.pv11-rpt .modal-f { padding: 4px 10px; flex: none; }
.pv11-opt { flex: none; display: flex; gap: 4px 8px; flex-wrap: wrap; align-items: center; font-size: 12px; margin-bottom: 4px; }
.pv11-opt select, html[data-ui="3"] .pv11-opt select { height: 26px !important; min-height: 0 !important; padding: 0 20px 0 6px !important; font-size: 12px !important; width: auto !important; min-width: 0 !important; border-radius: 6px; background-position: right 4px center; }
.pv11-opt label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; white-space: nowrap; }
.pv11-opt .btn { height: 26px; min-height: 0; padding: 0 8px; font-size: 12px; }
.pv11-opt [data-info] { font-size: 11px; }
.pv11-opt .pv11-ctl { color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 1px 3px; }
.pv11-opt .pv11-b:hover, .pv11-opt .pv11-b:focus-visible { background: var(--surface-2, #eef3f1); border-color: var(--border); }
.pv11-opt .pv11-b.on { background: rgba(80,216,144,.22); border-color: #2fa86b; }
.pv11-more { flex: none; }
.pv11-more[hidden] { display: none; }
.pv11-fwrap { flex: 1 1 auto; min-height: 0; display: flex; background: #e8eeec; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.pv11-fwrap iframe { flex: 1 1 auto; width: 100%; height: 100%; border: 0; background: #e8eeec; }
.pv11-fwrap:fullscreen { border-radius: 0; }
/* A17: the drawing / file viewer keeps most of the screen for the sheet */
.modal-bg.maxed .fv-stage .stage { height: calc(100vh - 172px); }
.modal-bg.maxed .modal-b:has(.fv) { padding: 6px 10px; }
.modal-bg.maxed .modal:has(.fv) .modal-h { padding: 6px 14px; }
.modal-bg.maxed .modal:has(.fv) .modal-f { padding: 4px 14px; }
.fv-stage .stage:fullscreen, .stage:fullscreen { height: 100vh !important; border-radius: 0; }
.stage { height: 76vh; }
[data-st]:fullscreen { background: #f4f6f6; } [data-st]:fullscreen .stage { height: 100vh !important; border-radius: 0; }
/* ---- B7: project page ---- */
.b11-kpis .kpi { cursor: pointer; }
.b11-st { display: block; color: inherit; text-decoration: none; }
.b11-st:hover { border-color: var(--kx-blue, #4f98ca); }
.b11-st .card-h { display: flex; align-items: center; gap: 8px; }
.b11-st .card-h h3 { flex: 1; }
.b11-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.b11-step { display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; min-width: 0; }
.b11-step.done { border-style: solid; border-color: #2fa86b; background: rgba(80, 216, 144, .10); }
.b11-tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.b11-step.done .b11-tick { border-color: #2fa86b; background: #2fa86b; color: #fff; }
.b11-step .small { overflow-wrap: anywhere; }
.b11-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.b11-chip { padding: 2px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; background: var(--surface-2, #f3f6f5); }
.b11-tiles { align-items: stretch; }
@media (max-width: 1100px) { .b11-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .b11-tiles, .b11-steps { grid-template-columns: 1fr; } }
.b11-st h3, .b11-st b { color: var(--text); } .b11-st .small { color: var(--text-2, var(--muted, #5b6b70)); }

/* C11: upload tile */
.b11-uprow { display: flex; gap: 14px; align-items: center; }
.b11-uptile { width: 150px; height: 150px; flex: 0 0 150px; border: 2px dashed var(--kx-green, #2e9e6b); border-radius: 14px; background: var(--ok-bg, #eefaf3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; cursor: pointer; color: var(--text-2); font-size: 12px; }
.b11-uptile svg { width: 34px; height: 34px; }
.b11-uptile b { font-size: 15px; color: var(--text-1, inherit); }
.b11-uptile.over, .b11-uptile:hover, .b11-uptile:focus { border-style: solid; box-shadow: 0 0 0 3px rgba(80,216,144,.25); outline: none; }
.b11-upinto { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); margin-bottom: 10px; }

/* C12 */
.b11-exprev { max-height: 62vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.b11-exprev thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }

/* C10: one aligned filter bar */
.b11-fbar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.b11-fbar select, .b11-fbar input, .b11-fbar .btn { height: 34px; width: 100%; box-sizing: border-box; margin: 0; }
.b11-fbar label { display: flex; flex-direction: column; font-size: 11px; color: var(--text-3); gap: 2px; margin: 0; }
@media (max-width: 900px) { .b11-fbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* B9: Statutory Approvals */
.b11-st5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .b11-st5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.b11-segs { display: flex; flex-wrap: wrap; gap: 6px; }
.b11-seg { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: inherit; }
.b11-seg.on { background: var(--kx-dark, #102e32); color: #fff; border-color: transparent; }
.b11-seg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.b11-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; vertical-align: middle; }
.b11-stat { white-space: nowrap; }
tr.b11-strow td:first-child { box-shadow: inset 4px 0 0 var(--stc, transparent); }
tr.st-completed, tr.st-ontime { --stc: #1f9d55; } tr.st-nearing { --stc: #d9a406; background: rgba(217,164,6,.07); } tr.st-delayed { --stc: #d64545; background: rgba(214,69,69,.07); } tr.st-na { --stc: #9aa5a1; }

/* B8 Work Progress */
.b11-bar { display: inline-block; width: 120px; height: 10px; border-radius: 6px; background: var(--border, #dfe6e3); overflow: hidden; vertical-align: middle; }
.b11-bar > i { display: block; height: 100%; border-radius: 6px; }
.b11-wpt tr.lv1 { cursor: pointer; background: color-mix(in srgb, var(--surface, #fff) 88%, #4f98ca 12%); }
.b11-wpt tr.lv2 { cursor: pointer; }
.b11-wpm td.cell { text-align: center; min-width: 110px; }
.b11-wpm td.none { color: #9aa5a1; }
.b11-wpm tr.tot td { border-top: 2px solid var(--border, #dfe6e3); }

/* D1 MMT placed drawings */
.b11-pl { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .b11-pl { grid-template-columns: 1fr; } }
.b11-pl-wrap { overflow: auto; max-height: 76vh; border: 1px solid var(--border, #dfe6e3); border-radius: 8px; background: #fff; }
.b11-pl-in { position: relative; }
.b11-pl-in > svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.b11-pl-nofile { display: flex; align-items: center; justify-content: center; padding: 24px; color: #667; text-align: center; background: repeating-linear-gradient(45deg, #fafafa, #fafafa 14px, #f3f3f3 14px, #f3f3f3 28px); }
.b11-pl-leg { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.b11-pl-leg .sw { flex: 0 0 26px; height: 16px; margin-top: 3px; border: 2px dashed; border-radius: 3px; }
.b11-pl tr.on { background: color-mix(in srgb, var(--surface, #fff) 80%, #d9a406 20%); }

/* A4 feature usage heatmap */
.b11-heat-wrap { overflow: auto; max-height: 70vh; }
.b11-heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.b11-heat th { font-weight: 600; color: var(--muted, #667); padding: 2px 4px; position: sticky; top: 0; background: var(--surface, #fff); z-index: 1; }
.b11-heat th.l, .b11-heat td.l { text-align: left; white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--surface, #fff); padding-right: 10px; }
.b11-heat td { min-width: 30px; height: 26px; text-align: center; border-radius: 4px; font-variant-numeric: tabular-nums; }
.b11-heat td.t { font-weight: 700; padding: 0 8px; }

/* V2.29 (Batch 15 item 3): "Sources to be used" and the sources of an AI answer */
.ai15-src { display: flex; gap: 8px; align-items: flex-start; padding: 4px 2px; border-bottom: 1px solid var(--border); }
.ai15-src input { margin-top: 3px; }
.ai15-cite { position: fixed; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; z-index: 900; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); }
.ai15-cite ul { margin: 4px 0 8px 18px; padding: 0; }
/* V2.29 (Batch 15 item 2): Concrete Grades */
.g15 table.t td, .g15 table.t th { vertical-align: top; }
.g15 select, .g15 input[type=number], .g15 input[type=text] { min-width: 0; }
.g15-warn { border-left: 3px solid var(--warn, #b7791f); padding-left: 8px; }
.g15-rr { display: inline-block; padding: 1px 6px; border-radius: 6px; background: #fdecc8; color: #7a4b00; font-size: 11px; font-weight: 600; }
