/* Metre2 Quote Comparison 2.0 - "blueprint" look (approved concepts, design/quote-comparison/mockups):
   ink shell with a faint grid and soft glow, white paper sheets for the data,
   Instrument Sans + IBM Plex Mono, signal cyan accent, tape yellow for awarded and plugged. */

@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #0b1626; --ink2: #111f33; --ink3: #18293f; --line-d: #22354d;
  --paper: #ffffff; --mist: #f3f5f8; --line: #e2e7ee; --slate: #4a5565; --muted: #6b7686;
  --cyan: #22d3ee; --cyan-d: #0aa5c2; --cyan-soft: #e3f9fd; --cyan-ink: #087e95;
  --tape: #ffb81c; --tape-soft: #fff3d6; --tape-ink: #7a5200;
  --low: #0f9f6e; --low-bg: #e3f6ee; --high: #d9473a; --high-bg: #fdeceb;
  --font: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, ui-monospace, monospace;
  /* keystone-pro.js panel theming */
  --ks-surface: #ffffff; --ks-raise: #f3f5f8; --ks-text: #0b1626; --ks-muted: #4a5565; --ks-dim: #6b7686;
  --ks-border: #e2e7ee; --ks-border-strong: #cfd6df; --ks-accent: #0aa5c2; --ks-ok: #0f9f6e; --ks-font: var(--font);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); font-size: 14px; overflow: hidden;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(34, 211, 238, .16), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(31, 79, 224, .18), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0/32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0/32px 32px,
    var(--ink);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

#app { display: flex; height: 100vh; }

/* ---------------------------------------------------------------- rail */
.rail { width: 72px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 6px; border-right: 1px solid var(--line-d); background: rgba(11, 22, 38, .6); }
.logo { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(145deg, #2ce0fa, #0aa5c2); position: relative; margin-bottom: 14px; box-shadow: 0 10px 30px -8px rgba(34, 211, 238, .7); border: 0; padding: 0; }
.logo i { position: absolute; width: 6px; border-radius: 3px; background: var(--ink); bottom: 10px; }
.logo i:nth-child(1) { left: 10px; height: 14px; } .logo i:nth-child(2) { left: 18px; height: 21px; } .logo i:nth-child(3) { left: 26px; height: 10px; background: #fff; }
.logo b { position: absolute; right: 6px; top: 6px; width: 7px; height: 7px; border-radius: 2px; background: var(--tape); }
.ri { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #7d8ea6; background: none; border: 0; position: relative; }
.ri svg { width: 22px; height: 22px; }
.ri:hover:not(:disabled) { color: #cfe3f3; background: rgba(255, 255, 255, .05); }
.ri.on { background: rgba(34, 211, 238, .13); color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .35); }
.ri:disabled { opacity: .3; cursor: default; }
.ri .tip { position: absolute; left: 56px; top: 50%; transform: translateY(-50%); background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 50; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5); }
.ri:hover .tip { opacity: 1; }
.ri .pro-dot { position: absolute; right: 6px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--tape); }
.rail .fill { flex: 1; }

/* ---------------------------------------------------------------- main */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 20px 26px 22px; }
.top { display: flex; align-items: center; gap: 12px; color: #c9d4e3; min-height: 58px; }
.top .titles { min-width: 0; }
.crumb { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #8ea0b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { color: #e8eef6; font-weight: 500; }
.crumb a { color: inherit; text-decoration: none; cursor: pointer; } .crumb a:hover { color: #e8eef6; }
.top h1 { margin: 2px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.025em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top h1[contenteditable="true"] { outline: none; border-radius: 6px; }
.top h1[contenteditable="true"]:hover { box-shadow: 0 0 0 1px var(--line-d); }
.top h1[contenteditable="true"]:focus { box-shadow: 0 0 0 2px var(--cyan-d); }
.top .grow { flex: 1; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.search { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line-d); border-radius: 12px; padding: 0 12px; width: 260px; color: #7d8ea6; }
.search svg { width: 16px; height: 16px; flex: none; }
.search input { background: none; border: 0; outline: none; color: #e3eaf3; padding: 10px 0; width: 100%; }

.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 11px; padding: 9px 15px; font-weight: 600; font-size: 14px; border: 1px solid transparent; white-space: nowrap; background: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(180deg, #38dcf3, #12b6d3); color: var(--ink); box-shadow: 0 10px 26px -10px rgba(34, 211, 238, .8); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: rgba(255, 255, 255, .06); color: #e3eaf3; border-color: var(--line-d); }
.btn.ghost:hover { background: rgba(255, 255, 255, .11); }
.btn.light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.light:hover { background: var(--mist); }
.btn.tape { background: var(--tape); color: var(--ink); }
.btn.danger { background: var(--high-bg); color: var(--high); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: default; }
.ks-pro-badge, .pro-tag { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .06em; background: var(--tape); color: var(--ink); border-radius: 5px; padding: 1px 5px; }
body.is-pro .pro-tag { display: none; }

#proPill { margin-left: 2px; }

.view { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 18px; }

/* ---------------------------------------------------------------- KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { border-radius: 18px; padding: 15px 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .09); color: #c9d4e3; min-width: 0; }
.kpi .l { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8ea0b8; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: #fff; margin-top: 4px; white-space: nowrap; }
.kpi .v small { font-size: 15px; color: #8ea0b8; font-weight: 500; margin-left: 4px; }
.kpi .s { font-size: 13px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grad { background: linear-gradient(90deg, #7cf0ff, #22d3ee 50%, #7aa2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.good { color: #4fe3b0; } .bad { color: #ff8a7e; }

/* ---------------------------------------------------------------- board */
.board { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 16px; margin-top: 16px; flex: 1; min-height: 0; }
.col { border-radius: 20px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.col.mid { border-color: rgba(34, 211, 238, .18); }
.colh { display: flex; align-items: center; gap: 10px; color: #dfe7f1; font-weight: 600; font-size: 15px; padding: 2px 4px; }
.colh .n { font-family: var(--mono); font-size: 12px; color: #8ea0b8; background: rgba(255, 255, 255, .07); border-radius: 999px; padding: 2px 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.empty-col { color: #6f8098; font-size: 13px; padding: 4px 6px; }
.card { background: var(--paper); border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6); position: relative; cursor: pointer; text-align: left; border: 2px solid transparent; width: 100%; }
.card:hover { border-color: rgba(34, 211, 238, .55); }
.card h3 { margin: 0; font-size: 16.5px; letter-spacing: -.015em; padding-right: 26px; }
.card .meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 13px; }
.quotes { display: flex; gap: 4px; }
.quotes i { width: 16px; height: 6px; border-radius: 3px; background: #dde3eb; }
.quotes i.in { background: var(--cyan-d); } .quotes i.dec { background: #f3c6c1; }
.card .fig { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; gap: 8px; }
.card .fig b { font-family: var(--mono); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.card .fig span { font-size: 12.5px; font-family: var(--mono); white-space: nowrap; }
.card .menu-btn { position: absolute; top: 10px; right: 8px; }
.range { position: relative; height: 8px; border-radius: 4px; background: var(--mist); margin-top: 10px; }
.range .band { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #a7f0ff, #22d3ee); min-width: 4px; }
.range .est { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); border-radius: 1px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px; border-radius: 7px; text-transform: uppercase; white-space: nowrap; }
.chip.cy { background: var(--cyan-soft); color: var(--cyan-ink); }
.chip.tp { background: var(--tape-soft); color: var(--tape-ink); }
.chip.gr { background: var(--mist); color: var(--slate); }
.chip.lo { background: var(--low-bg); color: var(--low); }
.chip.hi { background: var(--high-bg); color: var(--high); }
.card .chip { margin-top: 10px; }
.award { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--slate); }
.award .av, .avatar { width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: var(--tape); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
.award .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- home (projects) */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; overflow: auto; align-content: start; padding-bottom: 10px; }
.proj { background: var(--paper); border-radius: 18px; padding: 16px 18px; cursor: pointer; border: 2px solid transparent; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6); position: relative; text-align: left; }
.proj:hover { border-color: rgba(34, 211, 238, .55); }
.proj .num { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.proj h3 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.015em; padding-right: 26px; }
.proj .row { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--slate); flex-wrap: wrap; }
.proj .row b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.proj .when { font-size: 12px; color: var(--muted); margin-top: 10px; }
.proj .menu-btn { position: absolute; right: 10px; top: 12px; }
.welcome { max-width: 760px; margin: 40px auto 0; text-align: center; color: #c9d4e3; }
.welcome h2 { color: #fff; font-size: 30px; letter-spacing: -.02em; margin: 0 0 8px; }
.welcome p { margin: 0 auto; max-width: 560px; line-height: 1.55; color: #9fb0c6; }
.welcome .actions { justify-content: center; margin-top: 22px; }
.welcome .opens { margin-top: 18px; font-size: 12.5px; color: #6f8098; font-family: var(--mono); }
.dropzone-hint { position: fixed; inset: 12px; border: 2px dashed var(--cyan); border-radius: 20px; background: rgba(11, 22, 38, .72); color: #fff; display: grid; place-items: center; font-size: 20px; font-weight: 600; z-index: 400; pointer-events: none; }

/* ---------------------------------------------------------------- comparison */
.leader { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 6px; flex: none; }
.lc { flex: 0 0 250px; border-radius: 18px; padding: 13px 15px; background: var(--paper); position: relative; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .7); cursor: pointer; border: 0; text-align: left; }
.lc:hover { box-shadow: 0 0 0 2px rgba(34, 211, 238, .5), 0 18px 40px -24px rgba(0, 0, 0, .7); }
.lc.first { background: linear-gradient(160deg, #ffffff 55%, #dff9fe); box-shadow: 0 0 0 2px var(--cyan), 0 20px 44px -18px rgba(34, 211, 238, .6); }
.lc.chosen { background: linear-gradient(160deg, #ffffff 55%, #fff1cc); box-shadow: 0 0 0 2px var(--tape), 0 20px 44px -18px rgba(255, 184, 28, .5); }
.lc.dec, .lc.hid { background: rgba(255, 255, 255, .55); color: #5f6b7b; }
.lc .rk { position: absolute; top: 12px; right: 14px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lc.first .rk { color: var(--cyan-ink); } .lc.chosen .rk { color: var(--tape-ink); }
.lc .nm { font-weight: 700; font-size: 15px; letter-spacing: -.01em; max-width: calc(100% - 92px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc .tot { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -.03em; margin-top: 7px; white-space: nowrap; }
.lc .sub { display: flex; gap: 10px; margin-top: 7px; font-size: 12.5px; color: var(--slate); align-items: center; white-space: nowrap; }
.lc .delta { font-family: var(--mono); font-weight: 600; }
.lc.add { background: rgba(255, 255, 255, .05); color: #c9d4e3; border: 1.5px dashed var(--line-d); display: grid; place-items: center; font-weight: 600; box-shadow: none; flex-basis: 170px; }
.lc.add:hover { border-color: var(--cyan); color: #fff; }
.ring { --p: 90; width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(var(--cyan-d) calc(var(--p) * 1%), #e5eaf0 0); display: grid; place-items: center; flex: none; }
.ring::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #fff; }

.sheet { margin-top: 14px; flex: 1; min-height: 0; background: var(--paper); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.sheet .bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sheet .bar .grow { flex: 1; }
.seg { display: inline-flex; background: var(--mist); border-radius: 10px; padding: 3px; }
.seg button { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--slate); background: none; border: 0; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.scroll { flex: 1; min-height: 0; overflow: auto; position: relative; }
table.g { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.g th { position: sticky; top: 0; background: #fff; z-index: 3; text-align: left; font-weight: 600; color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.g thead tr:first-child th { border-bottom: 0; }
.g thead tr:nth-child(2) th { top: 44px; }
.g th.subh { font-family: var(--font); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink); padding-bottom: 2px; height: 44px; vertical-align: bottom; }
.g th.subh small { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.g th.subh.dec { color: var(--high); font-style: italic; }
.g th.subh .subname { max-width: 200px; overflow: hidden; text-overflow: ellipsis; display: block; cursor: pointer; }
.g th.subh .subname:hover { color: var(--cyan-ink); }
.g th.r, .g td.num { text-align: right; }
.g td { padding: 0 10px; height: 32px; border-bottom: 1px solid #eef1f5; white-space: nowrap; background: #fff; }
.g td.num { font-family: var(--mono); font-size: 12.5px; }
.g .grp { border-left: 1px solid var(--line); }
.g td.ref { font-family: var(--mono); font-size: 12.5px; color: var(--slate); }
.g td.desc { max-width: 340px; min-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.g tr.hd td { background: var(--mist); font-weight: 700; font-size: 12.5px; color: var(--ink); }
.g tr.hd td.desc { overflow: visible; }
.g td.lo { background: var(--low-bg); color: var(--low); font-weight: 600; }
.g td.hi { background: var(--high-bg); color: var(--high); font-weight: 600; }
.g td.est { color: #7a8596; }
.g td.ro { color: #9aa4b2; }
.g td.cell { cursor: cell; }
.g td.cell:hover { box-shadow: inset 0 0 0 1px #c4ccd7; }
.g td.active { box-shadow: inset 0 0 0 2px var(--cyan-d) !important; }
.g td.editing { padding: 0; box-shadow: inset 0 0 0 2px var(--cyan-d) !important; }
.g td.editing input { width: 100%; height: 30px; border: 0; outline: none; padding: 0 9px; background: #fff; font: inherit; text-align: inherit; }
.g tr.sel td { box-shadow: inset 0 1px 0 var(--cyan), inset 0 -1px 0 var(--cyan); }
.g td.rowtools { width: 30px; padding: 0 4px; text-align: center; position: sticky; left: 0; z-index: 1; }
.g th.rowtools { position: sticky; left: 0; z-index: 4; }
.g tr:hover td.rowtools .icon-btn { opacity: 1; }
.g td.rowtools .icon-btn { opacity: 0; }
.pill { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; }
.pill.unp { background: repeating-linear-gradient(135deg, #f3f5f8 0 4px, #e6eaf0 4px 8px); color: #6b7686; }
.pill.inc { background: #eef2ff; color: #3247a8; }
.pill.txt { background: var(--mist); color: var(--slate); }
.plug { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--tape); margin-right: 6px; box-shadow: 0 0 0 3px var(--tape-soft); vertical-align: 1px; }
.g tfoot td { position: sticky; background: #f6f8fa; border-bottom: 0; }
.g tr.sumrow td { background: linear-gradient(180deg, #fbfcfd, #f3f5f8); color: var(--slate); height: 30px; }
.g tr.sumrow.first td { border-top: 1px solid var(--line); }
.g tr.sumrow.big td { font-weight: 700; font-size: 13.5px; color: var(--ink); border-top: 1px solid var(--line); height: 38px; }
.g tr.sumrow .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; background: var(--mist); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; margin-left: 8px; color: var(--muted); }
.g tr.addrow td { height: 38px; }
.linkbtn { background: none; border: 0; color: var(--cyan-ink); font-weight: 600; font-size: 13px; padding: 4px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px; }
.linkbtn:hover { background: var(--cyan-soft); }
.linkbtn svg { width: 14px; height: 14px; }
.icon-btn { width: 26px; height: 26px; border-radius: 7px; border: 0; background: none; display: inline-grid; place-items: center; color: var(--muted); padding: 0; }
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.dk .icon-btn { color: #8ea0b8; } .dk .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.empty-sheet { padding: 48px 24px; text-align: center; color: var(--slate); }
.empty-sheet h3 { margin: 0 0 6px; color: var(--ink); font-size: 18px; }
.empty-sheet p { margin: 0 auto 16px; max-width: 520px; line-height: 1.5; }
.empty-sheet .actions { justify-content: center; }
.legend { display: inline-flex; gap: 6px; }
.tol { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate); }
.tol select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; }

/* ---------------------------------------------------------------- import (add a quote) */
.wrap2 { display: grid; grid-template-columns: 360px 1fr; gap: 16px; flex: 1; min-height: 0; }
.panel { background: var(--paper); border-radius: 20px; padding: 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); min-height: 0; display: flex; flex-direction: column; }
.panel.scrolly { overflow: auto; }
.panel h2 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.panel .hint { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.drop { margin-top: 14px; border: 1.5px dashed #b9e9f3; background: var(--cyan-soft); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.drop:hover { border-color: var(--cyan-d); }
.file { width: 40px; height: 48px; border-radius: 8px; background: #1d7a44; color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: 10px; font-weight: 600; flex: none; }
.drop b { display: block; font-size: 14px; word-break: break-all; }
.drop span { font-size: 12.5px; color: var(--slate); }
.lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.map { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; font-size: 14px; }
.map select, .field select, .field input, .field textarea { border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; background: #fff; font-size: 13.5px; }
.map select { font-family: var(--mono); font-weight: 600; min-width: 150px; }
.stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat div { border-radius: 14px; background: var(--mist); padding: 10px 12px; }
.stat b { font-family: var(--mono); font-size: 21px; display: block; }
.stat span { font-size: 12px; color: var(--slate); }
.stat .ok b { color: var(--low); } .stat .warn b { color: var(--tape-ink); }
.how { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.how::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.how.ref { background: var(--low-bg); color: var(--low); }
.how.dsc { background: var(--cyan-soft); color: var(--cyan-ink); }
.how.chk { background: var(--tape-soft); color: var(--tape-ink); }
.how.no { background: var(--high-bg); color: var(--high); }
.how.adj { background: #eef2ff; color: #3247a8; }
.g tr.warnrow td { background: #fffaf0; }
.g td select.pick { border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; max-width: 260px; font-family: var(--mono); font-size: 12px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-top: 14px; cursor: pointer; }
.toggle input { width: 36px; height: 20px; appearance: none; background: #cfd6df; border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.toggle input::after { content: ""; position: absolute; width: 16px; height: 16px; top: 2px; left: 2px; background: #fff; border-radius: 50%; transition: left .15s; }
.toggle input:checked { background: var(--cyan-d); }
.toggle input:checked::after { left: 18px; }

/* ---------------------------------------------------------------- review & award */
.grid3 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; flex: 1; min-height: 0; }
.grid3 .left { overflow: auto; }
.grid3 .right { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow: auto; }
.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; position: relative; }
.br { display: grid; grid-template-columns: 180px 1fr 116px; align-items: center; gap: 12px; }
.br .n { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br .n small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.br .t { height: 28px; border-radius: 9px; background: var(--mist); position: relative; overflow: hidden; }
.br .t i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 9px; background: linear-gradient(90deg, #9beefd, #22d3ee); }
.br .t i.adj { background: repeating-linear-gradient(135deg, rgba(11, 22, 38, .16) 0 5px, transparent 5px 10px); border-radius: 0; }
.br.first .t i:first-child { background: linear-gradient(90deg, #38dcf3, #0aa5c2); }
.br.dec .t i { background: #e2e6ec; }
.br .v { font-family: var(--mono); font-weight: 600; font-size: 14.5px; text-align: right; }
.bars .estline { position: absolute; top: -10px; bottom: -8px; width: 0; border-left: 2px dashed var(--ink); }
.bars .estline span { position: absolute; top: -20px; left: -46px; width: 92px; text-align: center; font-family: var(--mono); font-size: 10.5px; font-weight: 600; background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 0; }
.rec { border-radius: 20px; padding: 20px; background: linear-gradient(150deg, #0e2036, #0b1626 60%); color: #dfe7f1; border: 1px solid rgba(34, 211, 238, .35); box-shadow: 0 30px 60px -30px rgba(34, 211, 238, .45); flex: none; }
.rec h2 { margin: 8px 0 0; color: #fff; font-size: 22px; letter-spacing: -.02em; }
.rec .big { font-family: var(--mono); font-size: 30px; font-weight: 600; color: #fff; letter-spacing: -.03em; margin-top: 6px; }
.rec ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.rec li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.rec li i { width: 20px; height: 20px; border-radius: 6px; background: rgba(34, 211, 238, .15); color: var(--cyan); display: grid; place-items: center; font-style: normal; font-size: 12px; flex: none; }
.rec li i.w { background: rgba(255, 184, 28, .18); color: var(--tape); }
.rec .actions { justify-content: flex-start; margin-top: 16px; }
.spread { display: grid; gap: 10px; margin-top: 10px; }
.sp { display: grid; grid-template-columns: 1fr 200px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--mist); }
.sp .d { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp .d small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.mini { position: relative; height: 22px; }
.mini .ln { position: absolute; top: 10px; left: 0; right: 0; height: 2px; background: #d7dde5; }
.mini b { position: absolute; top: 5px; width: 12px; height: 12px; border-radius: 50%; transform: translateX(-50%); border: 2px solid #fff; }
table.t2 { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.t2 th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.t2 th:first-child, .t2 td:first-child { text-align: left; }
.t2 td { padding: 7px 8px; border-bottom: 1px solid #eef1f5; text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.t2 td:first-child { font-family: var(--font); font-size: 13px; }
.t2 tr.b td { font-weight: 700; }
.t2 td.lo { background: var(--low-bg); color: var(--low); } .t2 td.hi { background: var(--high-bg); color: var(--high); }
.quals { margin-top: 8px; display: grid; gap: 6px; }
.qual { font-size: 13px; color: var(--slate); display: flex; gap: 8px; align-items: baseline; }
.qual b { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---------------------------------------------------------------- directory */
.dir { overflow: auto; }
.dir table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dir th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.dir td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; }
.dir tr:hover td { background: #fafbfc; }

/* ---------------------------------------------------------------- dialogs, menus, toast */
.overlay { position: fixed; inset: 0; background: rgba(5, 12, 22, .55); display: grid; place-items: center; z-index: 200; padding: 20px; }
.dialog { background: #fff; border-radius: 20px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); }
.dialog.wide { width: min(820px, 100%); }
.dialog header { padding: 18px 20px 6px; display: flex; align-items: flex-start; gap: 10px; }
.dialog header h2 { margin: 0; font-size: 19px; letter-spacing: -.015em; flex: 1; }
.dialog header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dialog .body { padding: 10px 20px; overflow: auto; }
.dialog footer { padding: 14px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.dialog footer .grow { flex: 1; }
.field { display: grid; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--slate); font-weight: 600; }
.field input, .field textarea, .field select { font-weight: 400; color: var(--ink); width: 100%; font-size: 14px; padding: 8px 10px; }
.field textarea { resize: vertical; min-height: 80px; font-family: var(--mono); font-size: 12.5px; }
.field input:focus, .field textarea:focus, .field select:focus, .map select:focus { outline: 2px solid var(--cyan-d); outline-offset: -1px; }
.fields2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 12px; font-size: 13.5px; }
.checks label { display: flex; gap: 6px; align-items: center; }
.qlist { display: grid; gap: 6px; }
.qrow { display: grid; grid-template-columns: 130px 1fr 110px 26px; gap: 6px; align-items: center; }
.qrow select, .qrow input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; width: 100%; }
.preview { border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 260px; margin-top: 8px; }
.preview table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.preview th, .preview td { padding: 5px 8px; border-bottom: 1px solid #eef1f5; text-align: left; white-space: nowrap; }
.preview th { background: var(--mist); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); position: sticky; top: 0; }
.radio-list { display: grid; gap: 8px; }
.radio-list label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.radio-list label:hover { border-color: var(--cyan-d); }
.radio-list small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.menu { position: fixed; z-index: 300; background: #fff; border-radius: 12px; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .45), 0 0 0 1px rgba(11, 22, 38, .08); padding: 6px; min-width: 200px; }
.menu button { display: flex; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; gap: 10px; align-items: center; }
.menu button:hover:not(:disabled) { background: var(--mist); }
.menu button:disabled { color: #aab3bf; cursor: default; }
.menu button.danger { color: var(--high); }
.menu button kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #fff; color: var(--ink); border-radius: 12px; padding: 11px 16px; font-size: 14px; font-weight: 500; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .55); z-index: 500; display: flex; gap: 12px; align-items: center; max-width: 80vw; }
.toast button { border: 0; background: var(--mist); border-radius: 8px; padding: 5px 10px; font-weight: 600; }
.web-note { font-size: 12px; color: #8ea0b8; }

/* ---------------------------------------------------------------- settings */
.settings { max-width: 760px; overflow: auto; display: grid; gap: 16px; align-content: start; }
.settings .panel h2 { margin-bottom: 8px; }
.settings p { color: var(--slate); line-height: 1.5; margin: 6px 0; font-size: 13.5px; }

/* ---------------------------------------------------------------- small windows */
@media (max-width: 1180px) {
  .board { grid-template-columns: 1fr 1fr; }
  .board .col:last-child { grid-column: span 2; }
  .grid3 { grid-template-columns: 1fr; }
  .wrap2 { grid-template-columns: 300px 1fr; }
  .search { width: 190px; }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: 1fr; }
  .board .col:last-child { grid-column: auto; }
  .wrap2 { grid-template-columns: 1fr; }
  .search { display: none; }
}

/* ---------------------------------------------------------------- print: the tender report */
#report { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; overflow: visible; color: #000; font-size: 11pt; }
  #app, .overlay, .toast, .menu, #ksProOverlay { display: none !important; }
  #report { display: block; }
  #report h1 { font-size: 20pt; margin: 0 0 2mm; letter-spacing: -.02em; }
  #report h2 { font-size: 13pt; margin: 7mm 0 2mm; }
  #report .meta { color: #555; font-size: 9.5pt; font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; }
  #report table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  #report th, #report td { border-bottom: 1px solid #ddd; padding: 1.6mm 2mm; text-align: right; }
  #report th:first-child, #report td:first-child { text-align: left; }
  #report th { font-family: var(--mono); font-size: 8pt; text-transform: uppercase; color: #555; }
  #report td.n { font-family: var(--mono); }
  #report .box { border: 1.5px solid #0aa5c2; border-radius: 3mm; padding: 4mm 5mm; margin-top: 4mm; }
  #report .box b.big { font-family: var(--mono); font-size: 18pt; display: block; margin: 1mm 0; }
  #report ul { margin: 2mm 0 0; padding-left: 5mm; }
  #report .sig { margin-top: 9mm; display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; font-size: 10pt; }
  #report .sig div { border-top: 1px solid #000; padding-top: 1.5mm; }
  #report .foot { margin-top: 8mm; font-size: 8pt; color: #777; }
  #report .pb { break-before: page; }
}
