/* V2.34 (Change Request Batch 18). Uses the VINCI tokens of app.css / ui3.css only. */

/* ---- item 2: CDE folders: numbers, links, breadcrumb, sub-folder list ---- */
.cde-fold { display: flex; align-items: flex-start; gap: 2px; }
.cde-fold .cde-fl { flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.cde-fold .cde-fl:hover { text-decoration: underline; }
.cde-fold .cde-fl:focus-visible, .cde-sub:focus-visible, .cde-crumbs a:focus-visible { outline: 2px solid var(--kx-blue); outline-offset: 2px; border-radius: 4px; }
.cde-fold > .muted.small { flex: none; margin-left: 4px; }
.cde-fold .cde-fm { float: none; flex: none; }
.cde-tg { width: 24px; height: 24px; font-size: 12px; border-radius: 4px; }
.cde-tg:not(.sp):hover { background: var(--surface-3); }
.cde-no { display: inline-block; min-width: 2.2em; margin-right: 4px; font-variant-numeric: tabular-nums; color: var(--text-3); font-weight: 600; font-size: .86em; }
.cde-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); }
.cde-crumbs a { color: var(--kx-blue); text-decoration: none; }
.cde-crumbs a:hover { text-decoration: underline; }
.cde-crumbs .sep { color: var(--text-3); }
.cde-subs .card-h { padding-bottom: 6px; }
.cde-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 0 14px 14px; max-height: 300px; overflow: auto; }
.cde-sub { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; background: var(--surface); min-width: 0; }
.cde-sub:hover { border-color: var(--kx-blue); background: var(--surface-2); }
.cde-sub .cde-subn { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 600px) { .cde-subgrid { grid-template-columns: 1fr; } }
.cde-docs { grid-template-columns: 330px minmax(0, 1fr); }
.cde-fold .cde-fl { display: flex; align-items: baseline; gap: 4px; }
.cde-fold .cde-fl .cde-no { flex: none; min-width: 2.6em; margin-right: 0; }
.cde-fold.on .cde-fl { text-decoration: none; }
@media (max-width: 860px) { .cde-docs { grid-template-columns: minmax(0, 1fr); } }
.cde-fold .cde-fn { min-width: 0; overflow-wrap: break-word; word-break: normal; }
.cde-fold .cde-fl:hover .cde-fn { text-decoration: underline; }
.cde-fold .cde-fl:hover { text-decoration: none; }

/* ---- item 4: BIM Viewer workspace ---- */
.b18-hidden { display: none !important; }
.b18-host { position: relative; }
.b18-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 8px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); min-height: 44px; }
.b18-ttl { display: flex; flex-direction: column; line-height: 1.15; margin-right: 6px; min-width: 0; }
.b18-ttl b { font-size: 14px; }
.b18-tools, .b18-grp { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.b18-tools { flex: 1 1 auto; }
.b18-sep { width: 1px; height: 24px; background: var(--border); margin: 0 2px; }
.b18-ib { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-2); cursor: pointer; text-decoration: none; }
.b18-ib:hover { background: var(--surface-2); color: var(--text); }
.b18-ib:focus-visible { outline: 2px solid var(--kx-blue); outline-offset: 1px; }
.b18-ib.on, .b18-ib.btn-primary { background: var(--info-bg); color: var(--kx-blue); border-color: var(--kx-blue); }
.b18-ib.sm { width: 28px; height: 28px; }
.b18-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.b18-pop { position: absolute; z-index: 30; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; padding: 12px 14px; box-shadow: var(--shadow-lg); }
.b18-pop label { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.b18-pop h4 { margin: 0 0 6px; }
.b18-popv label { justify-content: space-between; }
.b18-ipop { width: min(560px, calc(100vw - 32px)); }
.b18-ipop > * { margin-bottom: 8px; }
.b18-ws .bimv-body { display: flex; gap: 0; align-items: stretch; }
.b18-ws .bimv-canvas { flex: 1 1 auto; min-width: 0; height: calc(100vh - 220px); min-height: 380px; border-radius: var(--radius, 10px); }
.b18-dock { position: relative; flex: none; display: flex; flex-direction: column; min-width: 220px; max-width: 45vw; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 10px); overflow: hidden; }
.b18-dock[hidden] { display: none; }
.b18-l { margin-right: 8px; } .b18-r { margin-left: 8px; }
.b18-dockb { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.b18-rz { position: absolute; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 3; touch-action: none; }
.b18-l .b18-rz { right: -1px; } .b18-r .b18-rz { left: -1px; }
.b18-rz:hover, .b18-rz.on, .b18-rz:focus-visible { background: color-mix(in srgb, var(--kx-blue) 35%, transparent); outline: none; }
.b18-panel { display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; border-bottom: 1px solid var(--border); }
.b18-panel:last-child { border-bottom: 0; }
.b18-panel[hidden] { display: none; }
.b18-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.b18-pb { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 12px; }
.b18-ws .bimv-tree, .b18-ws .bimv-props { max-height: none; border: 0; box-shadow: none; padding: 0; background: none; }
.b18-models label { display: flex !important; gap: 6px; align-items: baseline; margin: 4px 0 !important; }
.b18-lay { display: flex; gap: 6px; align-items: baseline; margin: 2px 0; }
.b18-ilist { display: flex; flex-direction: column; gap: 6px; }
.b18-iss { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.b18-iss:hover { border-color: var(--kx-blue); }
.b18-nav { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.b18-nav[hidden] { display: none; }
.b18-ws .bimv-status { padding: 2px 4px; }
html.b18-max, html.b18-max body { overflow: hidden; }
html.b18-max .b18-host { position: fixed; inset: 0; z-index: 70; background: var(--bg, var(--surface-2)); padding: 6px; display: flex; flex-direction: column; }
html.b18-max .b18-host > .bimv { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
html.b18-max .b18-host .bimv-body { flex: 1 1 auto; min-height: 0; }
html.b18-max .b18-host .bimv-canvas { height: auto !important; }
html.b18-max .b18-host > [data-b16] { max-height: 40vh; overflow: auto; flex: none; }
@media (max-width: 860px) {
  .b18-ws .bimv-body { flex-direction: column; }
  .b18-dock { max-width: none; width: auto !important; margin: 0 0 8px; max-height: 45vh; }
  .b18-r { margin: 8px 0 0; order: 3; }
  .b18-rz { display: none; }
  .b18-ttl .muted { display: none; }
  .b18-nav { top: auto; bottom: 10px; transform: none; flex-direction: row; right: 50%; transform: translateX(50%); }
}
#view.b18-ws > .kx-crumbs { display: none !important; }
.b18-intools .row { display: flex; flex-direction: column; align-items: stretch !important; gap: 6px; }
.b18-intools label { display: flex !important; justify-content: space-between; gap: 8px; font-size: 13px; }
.b18-intools [data-sbox] { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.b18-intools [data-sbox].hidden { display: none; }
.b18-intools [data-sbox] span { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.b18-status { position: absolute; left: 10px; bottom: 8px; right: 70px; z-index: 4; pointer-events: none; padding: 3px 8px !important; border-radius: 6px; background: color-mix(in srgb, var(--surface) 85%, transparent); width: fit-content; max-width: calc(100% - 90px); min-height: 0 !important; }
.b18-status:empty { display: none; }
.b18-status a, .b18-status button { pointer-events: auto; }

/* ---- item 3: project dashboard hero row ---- */
.d18-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.d18-hero > .card { display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden; }
.d18-ph { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--border); min-height: 46px; flex-wrap: wrap; }
.d18-ph > b { font-size: 14px; }
.d18-sp { flex: 1 1 auto; }
.d18-cv { position: relative; flex: 1 1 auto; min-height: 300px; height: 320px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.d18-cv canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.d18-cv canvas:active { cursor: grabbing; }
.d18-msg { position: absolute; left: 12px; right: 12px; top: 12px; padding: 6px 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; }
.d18-upl { position: absolute; inset: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--border-strong); border-radius: 12px; background: none; color: var(--text-2); cursor: pointer; font: inherit; text-align: center; padding: 12px; }
.d18-upl:hover:not([disabled]) { border-color: var(--kx-blue); color: var(--kx-blue); background: var(--info-bg); }
.d18-upl:focus-visible { outline: 2px solid var(--kx-blue); outline-offset: 2px; }
.d18-upl[disabled] { cursor: not-allowed; opacity: .7; }
.d18-upl svg { width: 30px; height: 30px; }
.d18-upl span { font-size: 12.5px; color: var(--text-3); }
.d18-facts { padding: 16px 18px !important; gap: 6px; }
.d18-code { color: var(--text-3); font-size: 13px; }
.d18-name { margin: 0 0 6px; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.d18-facts .kv { margin: 0; }
.d18-addr { display: flex; gap: 6px; margin-top: 8px; color: var(--text-2); overflow-wrap: anywhere; }
.d18-desc { margin: 6px 0 0; }
.d18-map { position: relative; flex: 1 1 auto; min-height: 260px; height: 278px; background: var(--surface-2); z-index: 0; }
.d18-gimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.d18-mf { padding: 6px 14px; border-top: 1px solid var(--border); }
.d18-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; color: var(--text-2); }
.d18-pin { color: var(--text-3); }
.d18-segs { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.d18-seg { border: 0; background: var(--surface); color: var(--text-2); padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer; min-height: 30px; }
.d18-seg + .d18-seg { border-left: 1px solid var(--border); }
.d18-seg.on { background: var(--kx-blue); color: #fff; }
.d18-seg:focus-visible { outline: 2px solid var(--kx-blue); outline-offset: -2px; }
@media (max-width: 1280px) { .d18-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .d18-facts { grid-column: 1 / -1; order: -1; } }
@media (max-width: 760px) { .d18-hero { grid-template-columns: minmax(0, 1fr); } .d18-facts { order: 0; } .d18-cv { height: 260px; min-height: 240px; } .d18-map { height: 240px; min-height: 220px; } }

/* KPI and status tiles below the hero (Batch 11 item 7), restyled: white cards, coloured icon chip, no underlined text */
.d18-dash .b11-kpis { gap: 14px; }
.d18-dash .b11-kpis .kpi { border: 1px solid var(--border); border-radius: 12px; box-shadow: none; min-height: 118px; }
.d18-dash .b11-kpis .kpi:hover { border-color: var(--kx-blue); box-shadow: var(--shadow); transform: none; }
.d18-dash .b11-kpis .kpi .lbl { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-2); }
.d18-dash .b11-kpis .kpi .foot { overflow-wrap: anywhere; }
.d18-dash .b11-status { gap: 14px; }
.d18-dash .b11-st, .d18-dash .b11-st * { text-decoration: none !important; }
.d18-dash .b11-st { border: 1px solid var(--border); border-radius: 12px; box-shadow: none; }
.d18-dash .b11-st:hover { border-color: var(--kx-blue); box-shadow: var(--shadow); }
.d18-dash .b11-st .card-h { flex-wrap: wrap; row-gap: 6px; }
.d18-dash .b11-st .card-h h3 { flex: 1 1 auto; min-width: 0; }
.d18-dash .b11-st .card-h .badge { white-space: normal; max-width: 100%; text-align: left; line-height: 1.3; }
.d18-dash .b11-step { min-height: 72px; }
.d18-dash .b11-step .small { overflow-wrap: break-word; word-break: normal; }

/* ---- Batch 18 item 1: element-based Visual comparison (3.5) ---- */
.e18-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.e18-opts .f { margin: 0; min-width: 130px; flex: 0 1 170px; }
.e18-opts .f input { width: 100%; }
.e18-mode { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ok, #1e9e5a) 10%, var(--card, #fff)); border: 1px solid color-mix(in srgb, var(--ok, #1e9e5a) 35%, transparent); font-size: 13px; }
.e18-mode-px { background: color-mix(in srgb, #e08a00 10%, var(--card, #fff)); border-color: color-mix(in srgb, #e08a00 40%, transparent); }
.e18-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.e18-kpis .kpi { border-top: 3px solid var(--border); }
.e18-kpis .e18-kA { border-top-color: #1e9e5a; } .e18-kpis .e18-kA .val { color: #1e9e5a; }
.e18-kpis .e18-kD { border-top-color: #d13b3b; } .e18-kpis .e18-kD .val { color: #d13b3b; }
.e18-kpis .e18-kM { border-top-color: #e08a00; } .e18-kpis .e18-kM .val { color: #c27700; }
.e18-ov { overflow: hidden; }
.e18-ovbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.e18-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; }
.e18-leg span { display: inline-flex; align-items: center; gap: 6px; }
.e18-leg i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.e18-stage { width: 100%; background: #fff; line-height: 0; }
.e18-stage canvas { display: block; touch-action: none; cursor: grab; max-width: 100%; }
.e18-stage canvas:active { cursor: grabbing; }
.e18-hint { padding: 6px 12px; }
.e18-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.e18-filt { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.e18-filt select, .e18-filt input { max-width: 200px; }
.e18-list { max-height: 520px; overflow: auto; }
.e18-list tr[data-no] { cursor: pointer; }
.e18-list tr.on td { background: color-mix(in srgb, #1f5fbf 10%, transparent); }
.e18-ref { max-width: 260px; overflow-wrap: anywhere; }
.e18-bytype tr.e18-click { cursor: pointer; }
.e18-k { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: #fff; }
.e18-k-Added { background: #1e9e5a; } .e18-k-Deleted { background: #d13b3b; }
.e18-k-Moved, .e18-k-Resized, .e18-k-Modified { background: #e08a00; color: #1d1300; }
.e18-pxwrap { overflow: auto; } .e18-pxwrap canvas { max-width: 100%; height: auto; }
.b18-flag { color: #a35f00; }
@media (max-width: 1100px) { .e18-grid { grid-template-columns: minmax(0, 1fr); } }
.e18-grid > .card { min-width: 0; }
@media (max-width: 760px) { .e18-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .e18-opts .f { flex: 1 1 140px; } .e18-filt select, .e18-filt input { max-width: none; flex: 1 1 140px; } }
.e18-src .f, .e18-src select, .e18-src input[type=file] { min-width: 0; max-width: 100%; }
