@font-face { font-family: Urbanist; font-weight: 400; src: url(fonts/urbanist-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Urbanist; font-weight: 500; src: url(fonts/urbanist-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Urbanist; font-weight: 600; src: url(fonts/urbanist-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Urbanist; font-weight: 700; src: url(fonts/urbanist-latin-700-normal.woff2) format('woff2'); }
/* Alpenglow family look (matches Stock / Time / Job Hub): fog background, white panels, ink controls, status colour blocks */
:root {
  --bg: #ECEEF0; --panel: #F4F5F7; --panel2: #FFFFFF; --border: #DFE2E6; --border2: #C9CED4;
  --text: #15171A; --ink: #15171A; --ink-2: #464B52; --muted: #5F656D; --faint: #7A8089;
  --accent: #15171A; --accent-soft: #E9EBEE; --accent-2: #3BA9E6; --app: #3BA9E6;
  --wait: #4F5FD9; --turn: #D9F06A; --done: #BFE6D4; --ok: #1E7A52; --bad: #B42318;
  --danger: #B42318; --sel: #3BA9E6;
  font-family: Urbanist, system-ui, sans-serif; font-size: 13.5px; font-weight: 500; color: var(--text);
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--wait); outline-offset: 2px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
#app { display: flex; flex-direction: column; height: 100vh; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.spacer { flex: 1; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 12px; background: var(--panel2); border-bottom: 1px solid var(--border); min-height: 50px; flex-wrap: wrap; }
.brandbar { display: flex; align-items: center; gap: 9px; margin-right: 10px; }
.brandbar .mk { width: 30px; height: 30px; flex: none; border: 2px solid var(--ink); border-radius: 9px; padding: 3px; display: grid; place-items: center; }
.brandbar .mk svg { width: 100%; height: 100%; display: block; }
.brandbar .wm { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brandbar .app { font-weight: 600; color: var(--faint); font-size: 14px; }
.menubtn { font-weight: 600; font-size: 13px; gap: 4px; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 6px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink-2); }
.tbtn:hover { background: var(--panel); border-color: var(--border); }
.tbtn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tbtn.active svg [fill]:not([fill=none]) { }
.tbtn svg { display: block; }
.tgroup { display: flex; gap: 1px; }
.tsep { width: 1px; height: 24px; background: var(--border); margin: 0 6px; }
.zoomlbl { min-width: 58px; font-variant-numeric: tabular-nums; font-size: 12px; }

/* layout */
.main { flex: 1; display: flex; min-height: 0; }
.left { display: flex; flex-direction: column; background: var(--bg); min-width: 160px; }
.right { width: 276px; display: flex; flex-direction: column; background: var(--bg); }
.center { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vresizer { width: 4px; cursor: col-resize; background: transparent; margin-left: -2px; margin-right: -2px; z-index: 5; }
.vresizer:hover, .hresizer:hover { background: var(--app); }
.hresizer { height: 4px; cursor: row-resize; margin-top: -2px; margin-bottom: -2px; z-index: 5; }
.bottom { background: var(--panel2); margin: 8px 10px 0; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; min-height: 90px; }
.ptabs { display: flex; gap: 2px; margin: 10px; padding: 4px; background: var(--panel2); border-radius: 999px; }
.ptab { flex: 1; border: 0; background: transparent; padding: 6px 4px; cursor: pointer; color: var(--ink-2); border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.ptab:not(.active):hover { background: var(--panel); color: var(--ink); }
.ptab.active { color: #fff; background: var(--ink); }
.pbody { flex: 1; overflow: auto; }
.ptitle { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }

/* tabs */
.tabs { display: flex; gap: 4px; padding: 6px 10px 0; background: var(--bg); overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 14px; background: transparent; border: 1px solid transparent; border-radius: 999px; cursor: pointer; max-width: 260px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.tab:not(.active):hover { background: var(--panel2); }
.tab.active { background: var(--ink); color: #fff; }
.tab.active .tclose { color: #cfd3d8; }
.tab.active .tclose:hover { background: #33373D; color: #fff; }
.tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tclose { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; border-radius: 3px; color: var(--muted); }
.tclose:hover { background: #c9d2dc; color: var(--text); }
.banner { background: var(--turn); color: var(--ink); padding: 10px 14px; margin: 0 10px 8px; border-radius: 16px; font-size: 13.5px; font-weight: 600; }

/* documents */
.docarea { flex: 1; position: relative; min-height: 0; background: #C9CED4; margin: 0 10px; border-radius: 20px; overflow: hidden; }
.docview { position: absolute; inset: 0; overflow: auto; outline: none; }
.pages { position: relative; padding: 18px 24px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: max-content; min-width: 100%; }
.page { position: relative; background: #fff; box-shadow: 0 1px 6px rgba(21,23,26,.22); flex: none; }
.canvaswrap { position: absolute; inset: 0; overflow: hidden; }
.canvaswrap canvas.base { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvaswrap canvas.detail { position: absolute; }
.page .overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pagelabel { position: absolute; left: 0; top: -16px; font-size: 11px; font-weight: 600; color: var(--ink-2); pointer-events: none; }
.docview[data-tool="draw"], .docview[data-tool="calibrate"] { cursor: crosshair; }
.docview[data-tool="pan"], .docarea.space .docview { cursor: grab; }
.docview.panning { cursor: grabbing !important; }
.docview[data-tool="textselect"] { cursor: text; }
.docview:not(.textmode) .textLayer { pointer-events: none; }
.docview:not(.textmode) { user-select: none; }

.overlay .selbox { fill: none; stroke: var(--sel); }
.overlay .handle { fill: #fff; stroke: var(--sel); }
.overlay .vdot { fill: #fff; stroke: #e0245e; }
.overlay .snapdot { fill: #ffd400; stroke: #000; }
.overlay .hit { fill: rgba(255, 200, 0, .35); }
.overlay .hit.current { fill: rgba(255, 120, 0, .55); }

.text-editor { position: absolute; z-index: 20; border: 1.5px dashed var(--sel); background: rgba(255,255,255,.85); resize: none; overflow: hidden; outline: none; box-shadow: 0 0 0 2px rgba(26,115,232,.2); white-space: pre-wrap; }

.livetip { position: fixed; z-index: 1000; background: rgba(20, 28, 38, .92); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 12px; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.marquee { position: fixed; z-index: 900; border: 1px dashed var(--sel); background: rgba(26,115,232,.08); pointer-events: none; }

/* start screen */
.start { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.start-card { background: #fff; border-radius: 24px; padding: 30px 30px 24px; width: 580px; max-width: 92%; }
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.brand .title { font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.brand .logo { width: 56px; height: 56px; border: 2.5px solid var(--ink); border-radius: 15px; padding: 6px; flex: none; }
.brand .logo svg { width: 100%; height: 100%; display: block; }
.brand .sub { color: var(--muted); }
.start-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.recent { margin-bottom: 14px; max-height: 260px; overflow: auto; }
.ritem { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 14px; cursor: pointer; }
.ritem:hover { background: var(--panel); }
.rname { font-weight: 500; }
.rpath { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tips { font-size: 13px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--panel); padding-top: 14px; }

/* buttons */
.btn { border: 1px solid var(--border2); background: #fff; border-radius: 999px; padding: 0 16px; height: 36px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #33373D; border-color: #33373D; }
.btn.danger { color: var(--danger); }
.btn.small { height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn.icon { padding: 0 8px; min-width: 28px; justify-content: center; }
.btn.big { height: 46px; padding: 0 22px; font-size: 15px; }
.panel-actions { display: flex; gap: 6px; padding: 8px 10px; flex-wrap: wrap; }

/* status bar */
.status { display: flex; align-items: center; gap: 6px; padding: 2px 12px; height: 32px; background: var(--bg); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.status .sbtn { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status .sbtn:hover { background: var(--panel2); }
.status .sbtn.warn { background: var(--turn); color: var(--ink); }
.status .sbtn.on { background: var(--done); color: #0F2E21; }
.status .sbtn.icon { font-size: 16px; padding: 0 6px; }
.pageinput { width: 40px; text-align: center; background: #fff; border: 1px solid var(--border2); border-radius: 999px; padding: 1px 2px; }
.ssep { width: 1px; height: 16px; background: var(--border2); margin: 0 4px; }
.status .hint { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex-shrink: 1; }
.status .pos { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 8px; white-space: nowrap; }

/* thumbnails */
.thumbs { padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.thumb { padding: 5px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; text-align: center; }
.thumb canvas { display: block; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.thumb.current { border-color: var(--ink); background: var(--panel2); }
.thumb:hover:not(.current) { background: var(--panel2); }
.tlabel { font-size: 11px; color: var(--muted); margin-top: 3px; }
.tlabel { font-weight: 600; }
.tlabel .scaled { color: #1b7fb8; }

/* tool chest */
.set-head { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; user-select: none; }
.set-head .count { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 11px; }
.set-head.collapsed .caret { transform: rotate(-90deg); }
.caret { display: inline-block; transition: transform .1s; color: var(--muted); }
.tool-grid { display: flex; flex-direction: column; padding: 4px; }
.chest-tool { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; position: relative; }
.chest-tool:hover { background: var(--panel2); }
.chest-tool.active { background: var(--panel2); border-color: var(--ink); }
.chest-tool .ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: 9px; flex: none; }
.chest-tool .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chest-tool .pin { margin-left: auto; color: var(--accent-2); font-size: 9px; }
.empty { color: var(--muted); padding: 14px; font-size: 12px; text-align: center; }

/* search */
.search { padding: 8px; display: flex; flex-direction: column; gap: 6px; height: 100%; }
.srow { display: flex; gap: 6px; align-items: center; }
.srow input.wide { flex: 1; }
.sstatus { color: var(--muted); font-size: 12px; }
.sresults { overflow: auto; flex: 1; }
.sres { padding: 7px 9px; border-radius: 12px; cursor: pointer; font-size: 12px; line-height: 1.35; }
.sres:hover { background: var(--panel2); }
.sres.current { background: var(--panel2); box-shadow: inset 0 0 0 1px var(--ink); }
.sres mark { background: var(--turn); }
.spage { font-weight: 700; margin-right: 6px; }

/* properties */
.props { overflow-y: auto; overflow-x: hidden; flex: 1; padding-bottom: 12px; }
.props-head { padding: 2px 14px 6px; font-weight: 600; color: var(--muted); }
.psec { padding: 10px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.prow { display: flex; align-items: center; gap: 8px; padding: 3px 12px; }
.prow > span:first-child { width: 88px; flex: none; color: #4a5562; font-size: 12px; }
.prow input:not([type=checkbox]):not([type=color]):not([type=range]), .prow select, .prow textarea { flex: 1; min-width: 0; padding: 4px 9px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.prow textarea { resize: vertical; }
.prow input.num { max-width: 90px; }
.colorpick { display: inline-flex; align-items: center; gap: 6px; }
.colorpick input[type=color] { width: 44px; height: 26px; padding: 0 3px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.rangewrap { display: flex; align-items: center; gap: 6px; flex: 1; }
.rangewrap input { flex: 1; }
.rangeval { width: 36px; text-align: right; font-size: 11px; color: var(--muted); }
.measure-box { margin: 4px 12px 6px; padding: 12px 14px; background: #fff; border-radius: 18px; }
.mval { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.msub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.msub.warn { display: inline-block; background: var(--turn); color: var(--ink); padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.meta { padding: 6px 12px; font-size: 11px; color: var(--muted); line-height: 1.45; }

/* markup list */
.mlist { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--panel); }
.segs { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel); border-radius: 999px; }
.seg { border: 0; background: transparent; padding: 4px 13px; cursor: pointer; font-size: 13px; font-weight: 600; border-radius: 999px; color: var(--ink-2); }

.seg.active { background: var(--ink); color: #fff; }
.mfilter { width: 200px; height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; }
.msummary { color: var(--muted); font-size: 12px; }
.cb { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.mtable { flex: 1; overflow: auto; }
.mtable table { border-collapse: collapse; width: 100%; font-size: 12px; table-layout: fixed; }
.mtable th { position: sticky; top: 0; background: #fff; color: var(--muted); text-align: left; font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--border); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 1; }
.mtable th.sorted { color: var(--accent); }
.mtable td { padding: 5px 8px; border-bottom: 1px solid var(--panel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtable tbody tr { cursor: pointer; }
.mtable tbody tr:hover { background: var(--panel); }
.mtable tbody tr.selected { background: #DCEFFA; }
.mtable td.warn { color: var(--ink); background: rgba(217,240,106,.55); }
.stchip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; }
.stchip.Open { background: var(--turn); }
.stchip.Accepted, .stchip.Completed { background: var(--done); color: #0F2E21; }
.stchip.Rejected { background: #F6D3CF; color: var(--bad); }
.mtable td.num { font-variant-numeric: tabular-nums; }
.mtable td.strong { font-weight: 600; }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: 2px; border: 1px solid rgba(0,0,0,.25); vertical-align: middle; }

/* modals, menus, toasts */
.modal-overlay { position: fixed; inset: 0; background: rgba(21, 23, 26, .45); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal { background: #fff; border-radius: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.2); max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; }
.modal-title { padding: 22px 22px 8px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.modal-body { padding: 6px 22px 10px; overflow: auto; }
.modal-body .prow { padding: 4px 0; }
.modal-body .prow > span:first-child { width: 110px; }
.modal-body .meta, .modal-body .psec { padding-left: 0; }
.modal-buttons { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 22px; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.field > span { font-size: 12px; color: #4a5562; }
input.wide { width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; font-size: 15px; }
input.wide:focus, .mfilter:focus { outline: 2px solid var(--wait); outline-offset: 0; border-color: transparent; }
.keys { border-collapse: collapse; width: 100%; }
.keys td { padding: 4px 6px; border-bottom: 1px solid #eef1f4; }
kbd { background: #f1f4f8; border: 1px solid var(--border2); border-radius: 3px; padding: 1px 6px; font-family: inherit; font-size: 12px; }
.ctxmenu { position: fixed; z-index: 3000; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 28px rgba(21,23,26,.16); padding: 6px; min-width: 200px; max-height: 90vh; overflow: auto; }
.ctxmenu .item { display: flex; justify-content: space-between; gap: 18px; padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.ctxmenu .head { padding: 8px 12px 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; }
.ctxmenu .item:hover { background: var(--panel); }
.ctxmenu .item.disabled { color: #aab3bd; cursor: default; background: none; }
.ctxmenu .hint { color: var(--muted); font-size: 11px; }
.ctxmenu .sep { height: 1px; background: var(--border); margin: 4px 6px; }
#toast { position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 12px 10px 18px; border-radius: 999px; display: flex; align-items: center; gap: 12px; font-weight: 600; opacity: 0; transition: all .2s; pointer-events: none; z-index: 4000; max-width: 70vw; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#toast button { border: 0; background: var(--turn); color: var(--ink); font-weight: 700; border-radius: 999px; height: 30px; padding: 0 14px; cursor: pointer; }
.busy { position: fixed; inset: 0; background: rgba(255,255,255,.55); z-index: 3500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border2); border-top-color: var(--app); border-radius: 50%; animation: spin .8s linear infinite; }
.busy-msg { font-weight: 500; color: #2b3745; }
@keyframes spin { to { transform: rotate(360deg); } }
.fatal { position: fixed; inset: 20px; background: #fff; color: #a00; padding: 20px; overflow: auto; z-index: 9999; }

/* combine dialog */
.combine .clist { border: 1px solid var(--border); border-radius: 16px; min-height: 160px; max-height: 300px; overflow: auto; background: #fafbfc; }
.crow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #edf0f3; background: #fff; }
.crow.over { box-shadow: inset 0 2px 0 var(--ink); }
.grip { cursor: grab; color: #9aa5b1; letter-spacing: -2px; }
.ctype { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; color: #fff; }
.ctype { border-radius: 999px; padding: 2px 8px; }
.ctype.pdf { background: var(--bad); } .ctype.img { background: var(--ok); }
.cname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* pdf.js text layer */
.textLayer { position: absolute; text-align: initial; inset: 0; overflow: clip; opacity: 1; line-height: 1; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 2; }
.textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer > :not(.markedContent), .textLayer .markedContent span:not(.markedContent) { z-index: 1; }
.textLayer span.markedContent { top: 0; height: 0; }
.textLayer ::selection { background: rgba(0, 90, 255, .3); }
.textLayer br::selection { background: transparent; }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; user-select: none; }
.textLayer.selecting .endOfContent { top: 0; }
.overlay .snapmk { fill: rgba(255, 212, 0, .55); stroke: #000; }
.overlay .snapmk.x { fill: none; stroke: #e0245e; }
.overlay .unassigned { fill: rgba(255, 140, 0, .18); stroke: #E8710A; pointer-events: none; }
.overlay .vports { pointer-events: none; }

/* ---------- estimate & price book ---------- */
.center { position: relative; }
.tbtn.estbtn { font-weight: 700; padding: 0 14px; border: 1px solid var(--border2); border-radius: 999px; color: var(--ink); white-space: nowrap; }
.tbtn.estbtn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.estpane { position: absolute; inset: 0; background: var(--bg); z-index: 50; display: flex; flex-direction: column; overflow: hidden; }
.estpane.hidden { display: none; }
.pbpane { z-index: 60; }
.est-head { display: flex; align-items: center; gap: 18px; padding: 12px 16px; flex-wrap: wrap; }
.est-title { min-width: 180px; }
.est-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.est-sub { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.est-kpis { display: flex; gap: 8px; }
.kpi { background: #fff; border-radius: 16px; padding: 6px 14px; display: flex; flex-direction: column; min-width: 92px; }
.kpi span { font-size: 11px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.est-marks { display: flex; gap: 12px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.pctin { width: 64px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 10px; text-align: right; }
.est-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.est-banner { margin: 0 16px 8px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--done); display: flex; align-items: center; gap: 12px; font-weight: 600; }
.est-banner.warnb { background: var(--turn); }
.est-tabs { margin: 0 16px 8px; align-self: flex-start; }
.est-body { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 16px; }
.est-split { display: flex; gap: 12px; align-items: flex-start; min-height: 100%; }
.est-rooms { width: 240px; flex: none; background: #fff; border-radius: 20px; padding: 6px; position: sticky; top: 0; }
.est-room { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; cursor: pointer; font-weight: 600; }
.est-room:hover { background: var(--panel); }
.est-room.active { background: var(--ink); color: #fff; }
.est-room .rn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-room .rv { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.est-room.warnroom { background: #FDE7D2; color: #8A3B00; }
.est-room.warnroom.active { background: #E8710A; color: #fff; }
.est-room.total { cursor: default; border-top: 1px solid var(--border); border-radius: 0; margin-top: 4px; }
.est-room.total:hover { background: transparent; }
.est-detail { flex: 1; min-width: 0; background: #fff; border-radius: 20px; padding: 10px 6px 14px; }
.est-rhead { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; }
.est-h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-right: auto; }
.est-settings { display: flex; flex-wrap: wrap; gap: 0 10px; }
.est-settings .prow { flex: 1 1 280px; }
.est-settings .prow.wide { flex-basis: 100%; }
.est-table { overflow-x: auto; padding: 0 8px; }
.est-table table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.est-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.est-table td { padding: 4px 8px; border-bottom: 1px solid var(--panel); vertical-align: middle; }
.est-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.est-table td.strong, .est-table .strong { font-weight: 700; }
.est-table td.unit, .est-table .muted, td.muted { color: var(--muted); font-size: 11.5px; }
.est-table td.ctr { text-align: center; }
.est-table tfoot td { font-weight: 700; border-top: 1px solid var(--border2); }
.est-table tr.grp-finish td, .est-table tr.grp-install td { background: #F7F8FA; }
.est-table.wide input { padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; }
.est-table td.flag { background: var(--turn); font-weight: 700; }
.est-table select { max-width: 260px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.adjin { width: 80px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; text-align: right; }
.namein { width: 200px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; }
.namein.wide { width: 100%; min-width: 220px; }
.unitin { width: 60px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 8px; }
.addsel { padding: 5px 10px; border: 1px dashed var(--border2); border-radius: 999px; background: #fff; font-weight: 600; color: var(--ink-2); }
a.lnk { color: #1b6fa8; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(27,111,168,.35); }
.est-sums { margin: 10px 14px 0 auto; max-width: 560px; }
.sumrow { display: flex; justify-content: space-between; gap: 16px; padding: 4px 4px; border-bottom: 1px solid var(--panel); font-variant-numeric: tabular-nums; }
.sumrow span { color: var(--ink-2); }
.sumrow.big { font-size: 15px; border-bottom: 0; padding-top: 8px; }
.sumrow.big span { color: var(--ink); font-weight: 600; }
.est-hw, .est-qb { background: #fff; border-radius: 20px; padding: 8px 6px 12px; }
.pbbody { display: flex; flex-direction: column; gap: 6px; }
.pbbody > * { background: #fff; border-radius: 20px; }
.pbbody > .psec { background: transparent; padding-left: 4px; }
.pbcols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; background: transparent !important; }
.pbcols > div { background: #fff; border-radius: 20px; padding-bottom: 8px; }
.linkrow { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.linkrow .namein { width: 170px; }
.review .est-table { max-height: 56vh; overflow: auto; }
.review tr.st-review td { background: #FBFDE8; }
.review tr.st-new td { background: #EEF2FF; }
.review tr.st-same td { color: var(--muted); }
.roomchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.roomchips .meta { width: 100%; padding: 0; }
.btn.chip { gap: 6px; }
.warnmeta { color: #8A3B00; background: #FDE7D2; border-radius: 10px; margin: 4px 12px; }
.tool-grid.est .chest-tool .lbl { font-size: 12.5px; }
.est-hint { font-size: 11.5px; color: var(--muted); padding: 2px 8px 6px; line-height: 1.4; }
/* estimate & price book use the whole window */
body.est-open .main > .left, body.est-open .main > .right, body.est-open .main > .vresizer { display: none !important; }
/* keep the toolbar on one row on smaller screens */
@media (max-width: 1600px) { .brandbar .wm, .brandbar .app { display: none; } .tsep { margin: 0 3px; } }
@media (max-width: 1380px) { .tbtn { min-width: 30px; padding: 0 4px; } }
