:root{
  --navy:#1a3c5e; --navy2:#3d6389; --band:#f0f4f8; --yellow:#fff2cc;
  --green:#2e7d32; --red:#c0392b; --amber:#b7791f; --ink:#222; --line:#c9d2dc;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:#e9edf2;-webkit-text-size-adjust:100%}
header{background:var(--navy);color:#fff;padding:10px 14px;position:sticky;top:0;z-index:20;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.brand{font-size:19px;font-weight:bold;letter-spacing:.5px}
.brand small{font-weight:normal;color:#c9d8e8;font-size:13px;margin-left:8px}
#syncdot{float:right;font-size:12px;font-weight:normal;padding:3px 9px;border-radius:12px;background:#33587c;color:#c9d8e8}
#syncdot.ok{background:#2e7d32;color:#fff}
#syncdot.work{background:#b7791f;color:#fff}
#syncdot.err{background:var(--red);color:#fff}
.cloudbox{background:#eef4ee;border:1px solid #cfe0cf;border-radius:8px;padding:12px;margin:10px 0}
@media(max-width:520px){#syncdot{float:none;display:block;margin-top:6px;text-align:center}}
nav{display:flex;gap:8px;margin-top:9px;flex-wrap:wrap}
nav button{flex:1;min-width:110px;font-size:16px;font-weight:bold;padding:12px 8px;border:none;border-radius:8px;background:var(--navy2);color:#fff;cursor:pointer}
nav button.active{background:var(--yellow);color:var(--navy)}
main{max-width:1020px;margin:0 auto;padding:14px}
section{display:none}
section.active{display:block}
.card{background:#fff;border-radius:10px;padding:16px;margin-bottom:14px;box-shadow:0 1px 4px rgba(20,40,70,.12)}
h2{margin:0 0 4px;color:var(--navy);font-size:19px}
h3{margin:16px 0 8px;color:var(--navy);font-size:15px}
.hint{font-size:13px;color:#666;margin:0 0 12px}
label{display:block;font-size:12px;font-weight:bold;color:var(--navy);margin-bottom:3px}
input,select{width:100%;font-size:16px;padding:11px 10px;border:1px solid var(--line);border-radius:7px;background:#fffdf4}
input:focus,select:focus{outline:2px solid var(--navy2)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:10px}
.btn{display:inline-block;font-size:16px;font-weight:bold;padding:13px 20px;border:none;border-radius:8px;cursor:pointer;background:var(--navy);color:#fff}
.btn.green{background:var(--green)}
.btn.ghost{background:#e6ebf1;color:var(--navy)}
.btn.small{font-size:13px;padding:8px 11px}
.btn.danger{background:var(--red)}
.btn:active{transform:translateY(1px)}
.line{display:grid;grid-template-columns:minmax(180px,3fr) 110px 110px 44px;gap:8px;align-items:end;margin-bottom:8px}
.line .oh{font-size:12px;color:#555;margin-top:4px}
.line.warnrow .oh{color:var(--red);font-weight:bold}
.line.warnrow input.qty{border-color:var(--red);background:#fdecea}
.wline{display:grid;grid-template-columns:minmax(160px,3fr) 90px 110px 110px 40px;gap:8px;align-items:end;margin-bottom:8px}
.wamt{padding:11px 2px;font-weight:bold;font-size:15px;color:var(--navy)}
.totbox{background:var(--band);border-radius:8px;padding:12px 14px;max-width:420px;margin-left:auto}
.totbox .trow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0;font-size:14px}
.totbox .trow input{width:74px;padding:7px 8px;text-align:right}
.totbox .pay{border-top:2px solid var(--navy);margin-top:6px;padding-top:8px;font-size:19px;font-weight:bold;color:var(--navy)}
.matbox{background:#eef4ee;border-radius:8px;padding:10px 12px;font-size:13px}
#calgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.caldow{font-size:11px;font-weight:bold;color:var(--navy);text-align:center;padding:4px 0;text-transform:uppercase}
.calcell{background:#fff;border:1px solid #e3e8ee;border-radius:6px;height:160px;padding:4px;cursor:pointer;min-width:0}
#calgrid .evchip{font-size:10px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3;height:31px;word-break:break-word}
.evmore{font-size:10px;font-weight:bold;color:var(--navy);background:#e6ebf1;border-radius:4px;padding:2px 6px;margin-top:3px;cursor:pointer;display:inline-block}
.evmore:hover{background:#d3dce6}
.evchip{position:relative;z-index:2;touch-action:none}
.evchip.evdone{opacity:.45}
.evchip.segstart{border-radius:4px 0 0 4px}
.evchip.segmid{border-radius:0;margin-left:-14px}
.evchip.segend{border-radius:0 4px 4px 0;margin-left:-14px}
.evslot{height:31px;margin-top:3px}
.evresize{position:absolute;top:0;right:0;width:14px;height:100%;cursor:ew-resize}
.evresize:after{content:'';position:absolute;right:3px;top:3px;bottom:3px;width:3px;border-radius:2px;background:rgba(255,255,255,.65)}
.calcell.droptarget{outline:3px solid var(--green);outline-offset:-2px}
body.dragging{cursor:grabbing}
body.dragging *{user-select:none}
.calcell:hover{border-color:var(--navy2)}
.calcell.wk{height:320px}
.calcell.other{background:transparent;border:none;cursor:default}
.caldn{font-size:11px;color:#666;text-align:right;min-height:16px}
.caldn .tdy{background:var(--navy);color:#fff;border-radius:10px;padding:1px 7px;font-weight:bold}
.evchip{font-size:10px;font-weight:bold;color:#fff;border-radius:4px;padding:2px 5px;margin-top:3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}
.uprow{display:flex;align-items:center;gap:8px;padding:5px 0;border-bottom:1px solid #eef1f4}
.uprow b{font-size:12px;color:var(--navy);min-width:78px}
.uprow .evchip{font-size:12px;margin-top:0;max-width:100%}
.calbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.calbar b{font-size:17px;color:var(--navy);flex:1;text-align:center;min-width:140px}
@media(max-width:640px){.calcell{height:118px;padding:2px}#calgrid .evchip{font-size:8px;padding:1px 3px;height:25px}.evslot{height:25px}}
@media(max-width:640px){.wline{grid-template-columns:1fr 74px 90px 40px}.wline>div:first-child{grid-column:1/-1}}
.removeline{background:#e6ebf1;border:none;border-radius:7px;font-size:18px;color:var(--red);cursor:pointer;height:44px}
table{width:100%;border-collapse:collapse;font-size:14px}
th{background:var(--navy);color:#fff;text-align:left;padding:9px 8px;font-size:12px;text-transform:uppercase;letter-spacing:.4px}
td{padding:9px 8px;border-bottom:1px solid #e3e8ee;vertical-align:middle}
tr:nth-child(even) td{background:var(--band)}
.chip{display:inline-block;font-size:11px;font-weight:bold;padding:4px 9px;border-radius:12px}
.chip.ok{background:#e2efda;color:#245c2b}
.chip.low{background:#ffe599;color:#7f6000}
.chip.out{background:#ffc7ce;color:#9c0006}
.chip.open{background:#dce6f1;color:var(--navy)}
.chip.closed{background:#e0e0e0;color:#555}
.sigwrap{border:2px dashed var(--line);border-radius:8px;background:#fff;position:relative}
.sigwrap canvas{width:100%;height:120px;display:block;touch-action:none;border-radius:8px}
.sigwrap .clearsig{position:absolute;top:6px;right:6px}
.sigwrap .siglabel{position:absolute;bottom:4px;left:10px;font-size:11px;color:#999;pointer-events:none}
.banner{background:var(--red);color:#fff;font-size:13px;font-weight:bold;padding:9px 14px;text-align:center}
.hidden{display:none!important}
#toast{position:fixed;left:0;right:0;bottom:0;background:var(--green);color:#fff;padding:13px;display:none;z-index:40;text-align:center;font-size:15px;font-weight:bold;pointer-events:none}
#toast .btn{pointer-events:auto}
#toast .btn{margin-left:10px}
#modalback{position:fixed;inset:0;background:rgba(10,25,45,.55);z-index:50;display:none;align-items:flex-start;justify-content:center;padding:20px;overflow:auto}
#modal{background:#fff;border-radius:10px;max-width:640px;width:100%;padding:18px;margin-top:4vh}
.searchbar{display:flex;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.searchbar input{flex:1;min-width:180px}
.catbar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.catbar button{font-size:13px;font-weight:bold;padding:9px 13px;border:none;border-radius:16px;background:#e6ebf1;color:var(--navy);cursor:pointer}
.catbar button.active{background:var(--navy);color:#fff}
.catbar button span{font-weight:normal;opacity:.7;font-size:11px}
.subtxt{font-size:11px;color:#888}
.ticketacts{display:flex;gap:6px;flex-wrap:wrap}
.warnbox{background:#fdecea;border:1px solid var(--red);color:var(--red);border-radius:8px;padding:10px;font-size:13px;font-weight:bold;margin:10px 0;display:none}
.notebox{background:var(--yellow);border-radius:8px;padding:10px 12px;font-size:13px;color:#7f6000;margin:10px 0}
.kv{font-size:13px;color:#444;line-height:1.7}
.statrow{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.stat{flex:1;min-width:130px;background:#fff;border-radius:10px;padding:12px;box-shadow:0 1px 4px rgba(20,40,70,.12);text-align:center}
.stat b{display:block;font-size:24px;color:var(--navy)}
.stat span{font-size:12px;color:#666}
#printArea{display:none}
@media print{
  header,nav,.banner,#toast,.btn,.searchbar,.catbar,.removeline,.noprint{display:none!important}
  body{background:#fff}
  .card{box-shadow:none;border:1px solid #ccc}
  body.print-ticket main{display:none!important}
  body.print-ticket #printArea{display:block!important}
}
.pt{font-family:Arial,Helvetica,sans-serif;color:#111;font-size:13px}
.wo2 .wohead{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}
.wo2 h1{font-size:26px;margin:0 0 8px;color:#111;letter-spacing:.5px}
.wo2 .co{font-size:11px;font-weight:bold;color:#222;line-height:1.55}
.wo2 .wologo{text-align:center;background:#cfe0f4;padding:12px 20px;border-radius:4px}
.wo2 .wologo .mc{font-size:46px;font-weight:900;color:#2f6fd0;line-height:1;font-family:'Arial Black',Arial,sans-serif}
.wo2 .wologo .fs{font-size:9px;font-weight:bold;color:#2f6fd0;letter-spacing:2.5px;margin-top:4px}
.wo2 .bar{background:var(--navy);color:#fff;font-weight:bold;font-size:11px;padding:4px 10px;margin:10px 0 4px;letter-spacing:.5px}
.wo2 .worow{display:flex;gap:26px}
.wo2 .worow>div{flex:1;min-width:0}
.wo2 .custblock{font-size:13px;line-height:1.6}
.wo2 .contact{font-weight:bold;margin-top:10px;font-size:12px}
.wo2 .instrow{display:flex;gap:12px}
.wo2 .instrow>div{flex:1}
.wo2 .val{text-align:center;font-weight:bold;padding:3px;font-size:12px}
.wo2 .hl{background:#f6f27a}
.wo2 .maroon{color:#8a2743;font-weight:bold;text-align:center;padding:3px;font-size:12px}
.wo2 table.wolines{width:100%;border-collapse:collapse;margin-top:14px;font-size:12px}
.wo2 table.wolines th{background:var(--navy);color:#fff;font-size:11px;text-align:left;padding:5px 8px;letter-spacing:.5px}
.wo2 table.wolines td{border-bottom:1px solid #aaa;padding:5px 8px;vertical-align:top}
.wo2 .wounit{color:#8a2743;font-weight:bold}
.wo2 .wonote{color:#8a2743}
.wo2 .ctr{text-align:center}
.wo2 .rt{text-align:right}
.wo2 .wobottom{display:flex;justify-content:space-between;margin-top:18px;gap:30px;align-items:flex-end}
.wo2 .wosig{flex:1;font-size:12px}
.wo2 .wosig img{max-height:60px;display:block}
.wo2 .sigline{border-bottom:1px solid #444;min-height:40px;margin-top:6px}
.wo2 .wototals{width:310px;font-size:12px}
.wo2 .wototals .trw{display:flex;justify-content:space-between;padding:3px 12px}
.wo2 .totalbar{display:flex;justify-content:space-between;background:var(--navy);color:#fff;font-weight:bold;font-size:18px;padding:7px 12px;margin-top:6px}
.wo2 .dedrow{display:flex;justify-content:space-between;font-size:12px;font-weight:bold;padding:3px 12px}
.wo2 .payrow{display:flex;justify-content:space-between;color:#2e7d32;font-weight:bold;font-size:19px;padding:5px 12px;border-top:2px solid #444;margin-top:2px}
.wo2 .wosmall{font-size:10px;color:#444;margin-top:12px}
.pt .pthead{background:var(--navy);color:#fff;padding:12px 16px;font-size:18px;font-weight:bold}
.pt .pthead small{display:block;font-size:11px;font-weight:normal;color:#c9d8e8;margin-top:3px}
.pt .ptmeta{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:6px 14px;padding:12px 4px}
.pt .ptmeta div{border-bottom:1px solid #999;padding:3px 2px;min-height:30px}
.pt .ptmeta label{font-size:9px;color:#555;display:block;font-weight:bold;margin:0}
.pt table{margin-top:6px}
.pt th{font-size:10px}
.pt .legal{background:var(--yellow);font-size:10px;font-style:italic;color:#7f6000;padding:8px 10px;border-radius:6px;margin-top:10px}
.pt .sigblock{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:18px}
.pt .sigcell{border-top:1px solid #444;padding-top:4px;font-size:10px;color:#444}
.pt .sigcell img{max-height:70px;display:block;margin-bottom:2px}
.pt .ptfoot{margin-top:16px;font-size:9px;color:#777;text-align:center}
@media(max-width:640px){
  .line{grid-template-columns:1fr 90px 90px 40px}
  .pt .ptmeta{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){
  .line{grid-template-columns:1fr 100px 44px}
  .line>div:first-child{grid-column:1/-1}
}
#authgate{position:fixed;inset:0;background:rgba(13,28,46,.94);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding:44px 16px;overflow:auto}
#authgate.hidden{display:none}
.authcard{background:#fff;border-radius:12px;max-width:420px;width:100%;padding:26px;box-shadow:0 10px 40px rgba(0,0,0,.4)}
.authcard a{color:var(--navy2);font-weight:bold;text-decoration:none}
.authcard a:hover{text-decoration:underline}
#userchip{float:right;font-size:12px;background:#33587c;color:#c9d8e8;border-radius:12px;padding:3px 9px;margin-right:8px;cursor:pointer}
#userchip:hover{background:#40668c;color:#fff}

.chip.c-bid{background:#e6e6e6;color:#555}.chip.c-won{background:#dce6f1;color:var(--navy)}
.chip.c-prog{background:#fff3cd;color:#7f6000}.chip.c-done{background:#e2efda;color:#245c2b}
.chip.c-inv{background:#d9e8ff;color:#123c78}.chip.c-paid{background:#c8e6c9;color:#1b5e20}
.chip.c-over{background:#ffc7ce;color:#9c0006}
tr.clickable:hover td{background:#e2ecf7;cursor:pointer}
.stat{flex:1;min-width:140px;background:#fff;border-radius:10px;padding:12px;box-shadow:0 1px 4px rgba(20,40,70,.12);text-align:center}
.stat b{display:block;font-size:22px;color:var(--navy)}
.stat b.g{color:var(--green)}.stat b.r{color:var(--red)}
.stat span{font-size:12px;color:#666}
.flow{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:12px;margin:0 0 10px}
.flow .step{background:var(--band);border-radius:14px;padding:5px 11px;font-weight:bold;color:#7a8794}
.flow .step.on{background:var(--navy);color:#fff}
.flow .step.done{background:#dbeadb;color:var(--green)}
.flow .arw{color:#b7c2cd}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px}
.pos{color:var(--green);font-weight:bold}.neg{color:var(--red);font-weight:bold}
.money{font-variant-numeric:tabular-nums}
.backlink{color:var(--navy2);font-size:13px;font-weight:bold;cursor:pointer;display:inline-block;margin-bottom:8px}
.backlink:hover{text-decoration:underline}
.wline.eline{grid-template-columns:150px minmax(130px,3fr) 64px 84px 78px 100px 44px 40px}
.wline.iline{grid-template-columns:150px minmax(140px,3fr) 74px 96px 100px 40px}
.wline .etype,.wline .cotype,.wline .iitem{max-width:100%}
#globalsearch{float:right;font-size:12px;background:#33587c;color:#c9d8e8;border-radius:12px;padding:3px 10px;margin-right:8px;cursor:pointer}
#globalsearch:hover{background:#40668c;color:#fff}
nav button{min-width:88px;font-size:13px}
/* ---- dashboard charts & minimize ---- */
.chead{display:flex;align-items:flex-start;gap:10px}
.ctt{flex:1;min-width:0}
.ctt h2{margin:0}
.csum{display:none;font-size:12px;color:#666;margin-top:2px}
.minbtn{flex:none;border:1px solid #c9d2dc;background:#f5f8fb;color:var(--navy,#1a3c5e);border-radius:7px;width:30px;height:30px;font-size:16px;font-weight:bold;line-height:1;cursor:pointer;padding:0}
.minbtn:hover{background:#e8eef5}
.dcard.cmin .cbody{display:none}
.dcard.cmin .csum{display:block}
.dashgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px;align-items:start;margin-bottom:14px}
.dashgrid .card{margin-bottom:0}
.cbody{margin-top:10px}
.dv-legend{display:flex;gap:14px;font-size:12px;color:#555;margin:2px 0 8px;flex-wrap:wrap}
.dv-legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.dvsvg{display:block;width:100%;height:auto}
.dvsvg text{font-family:Arial,Helvetica,sans-serif}
.dv-rowlab{font-size:12px;fill:#222}
.dv-dlab{font-size:11px;fill:#fff;font-weight:bold}
.dv-dlab2{font-size:11px;fill:#52514e;font-weight:bold}
.dv-axis{font-size:10px;fill:#8a8984}
.dv-pct{font-size:12px;font-weight:bold}
.dv-grid{stroke:#eef1f4;stroke-width:1}
.dv-chip{display:inline-block;font-size:11px;font-weight:bold;padding:2px 8px;border-radius:10px;background:#fff3cd;color:#7f6000;margin-top:6px}
.attlink{cursor:pointer}
.attlink:hover{text-decoration:underline;color:var(--navy,#1a3c5e)}
.wline.pline{grid-template-columns:minmax(140px,3fr) 70px 90px 100px 40px}
/* ---- phone polish (2026-08-14) ---- */
#navmenu{display:none}
@media(max-width:700px){
  /* nav: dropdown menu instead of a half-screen block */
  #navmenu{display:flex;align-items:center;gap:10px;width:100%;margin-top:9px;
    background:var(--navy2);color:#fff;border:none;border-radius:8px;
    font-size:16px;font-weight:bold;padding:12px 14px;cursor:pointer;text-align:left}
  nav{display:none;position:absolute;left:10px;right:10px;top:100%;margin-top:-4px;
    flex-direction:column;gap:6px;background:var(--navy);padding:10px;border-radius:0 0 12px 12px;
    box-shadow:0 10px 24px rgba(0,0,0,.4);z-index:40;max-height:70vh;overflow-y:auto}
  nav.open{display:flex}
  nav button{flex:none;width:100%;text-align:left;min-width:auto;padding:12px 14px;font-size:15px}
  /* tables scroll inside their card instead of pushing the page sideways */
  #ticketlist,#wolist,#dashjobs,#jobrows,#billrows,#estlist,#invlist,#colist,#teamlist,#custlist,#pbrows,#prodlist{overflow-x:auto;-webkit-overflow-scrolling:touch}
  table{font-size:13px}
  th,td{padding:7px 6px}
  /* charts: keep them readable and let them swipe sideways */
  .cbody{overflow-x:auto;-webkit-overflow-scrolling:touch}
  #dc_dollar svg{min-width:640px}
  #dc_billed svg,#dc_pipe svg,#dc_ar svg,#dc_crew svg{min-width:430px}
  /* estimate + PO line rows: stack instead of overflowing */
  .wline.eline{grid-template-columns:1fr 1fr 1fr 44px 40px}
  .wline.eline>div:nth-child(-n+2){grid-column:1/-1}
  .wline.iline{grid-template-columns:1fr 1fr 1fr 40px}
  .wline.iline>div:nth-child(-n+2){grid-column:1/-1}
  .wline.pline{grid-template-columns:1fr 1fr 1fr 40px}
  .wline.pline>div:first-child{grid-column:1/-1}
}
/* ---- customer picker (anti-duplicate combobox) ---- */
.combolist{position:absolute;left:0;right:0;top:100%;z-index:60;background:#fff;border:1px solid #c9d2dc;
  border-radius:0 0 10px 10px;box-shadow:0 10px 22px rgba(0,0,0,.2);max-height:230px;overflow-y:auto}
.combolist .cbo{padding:9px 12px;font-size:14px;cursor:pointer;border-bottom:1px solid #f0f2f5}
.combolist .cbo:last-child{border-bottom:none}
.combolist .cbo:hover{background:#eef4fb}
.combolist .cbonew{color:#2e7d32;font-weight:bold}


/* ==================== ERP SHELL (2026-08-19) ====================
   Same IDs, same behavior — only the frame changed.
   ≤700px: unchanged ☰ dropdown ("mobile app" view crews know)
   701–999px (iPad portrait): the familiar horizontal tab band
   ≥1000px: fixed left sidebar with grouped modules              */
:root{--navy:#16324f;--navy2:#24507a}
.ngroup{flex-basis:100%;font-size:10.5px;letter-spacing:1.2px;text-transform:uppercase;color:#7e97b3;font-weight:bold;padding:7px 6px 1px}
@media(min-width:701px) and (max-width:999px){
  nav .ngroup{display:none}
}
@media(min-width:1000px){
  body{background:#eef1f5}
  header{position:fixed;left:0;top:0;bottom:0;width:224px;overflow-y:auto;padding:16px 12px;
    box-shadow:2px 0 10px rgba(10,25,45,.25);z-index:30}
  .brand{font-size:17px;letter-spacing:.3px}
  .brand small{display:block;margin:3px 0 0;font-size:11px;color:#8fa9c4}
  #syncdot{float:none;display:inline-block;margin:10px 6px 0 0}
  #userchip{float:none;display:inline-block;margin:10px 6px 0 0}
  #globalsearch{float:none;display:block;margin:12px 0 0;text-align:left;background:rgba(255,255,255,.08);
    border-radius:8px;padding:9px 12px;font-size:13px;color:#cfdcea}
  #globalsearch:hover{background:rgba(255,255,255,.16);color:#fff}
  nav{flex-direction:column;gap:2px;margin-top:10px;padding-bottom:20px}
  nav button{flex:none;width:100%;text-align:left;min-width:0;font-size:14px;padding:10px 12px;
    background:transparent;border-left:3px solid transparent;border-radius:0 8px 8px 0;color:#cfdcea}
  nav button:hover{background:rgba(255,255,255,.07);color:#fff}
  nav button.active{background:rgba(42,120,214,.28);border-left-color:#5ea3f0;color:#fff}
  main{margin-left:224px;max-width:1264px;padding:18px 24px}
  #memBanner{margin-left:224px}
  .banner{margin-left:224px}
}
@media print{
  main{margin-left:0!important;max-width:none}
}


/* ==== MOCKUP POLISH (2026-08-19): KPI tiles + alert rows ==== */
.stat{display:flex;flex-direction:column-reverse;justify-content:flex-end;align-items:flex-start;text-align:left;
  border:1px solid var(--line);box-shadow:none;padding:12px 14px;gap:2px}
.stat span{font-size:10.5px;color:#5c6a78;font-weight:bold;text-transform:uppercase;letter-spacing:.5px}
.stat b{font-size:22px}
#dashatt .uprow{border-bottom:none;border-radius:8px;padding:10px 12px;margin-bottom:7px;background:var(--band)}
#dashatt .uprow.al-bad{background:#fde3e1}
#dashatt .uprow.al-warn{background:#fff3d6}
#dashatt .uprow.al-info{background:#e2edfb}
.dcard h2,.card h2{letter-spacing:.1px}

/* burn bars for budget-vs-actual */
.burn{height:10px;border-radius:5px;background:#e7ecf2;overflow:hidden;min-width:80px;margin-bottom:2px}
.burn i{display:block;height:100%;border-radius:5px}
.burn i.b-ok{background:#2a78d6}
.burn i.b-warn{background:#eb6834}
.burn i.b-over{background:#c0392b}

/* ==== DASH REDESIGN (2026-08-19) ==== */
.stat.hero{background:var(--navy);border-color:var(--navy)}
.stat.hero b{color:#fff;font-size:26px}
.stat.hero span{color:#9db8d4}
.jobrow{display:flex;align-items:center;gap:14px;padding:11px 12px;border-radius:9px;margin-bottom:6px;background:var(--band);flex-wrap:wrap}
.jobrow:hover{background:#e2ecf7;cursor:pointer}
.jobrow .jr-main{flex:1 1 190px;min-width:150px}
.jobrow .jr-main b{display:block;color:var(--navy);font-size:14.5px}
.jobrow .jr-stage{flex:0 0 auto}
.jobrow .jr-money{flex:0 0 130px;text-align:right;display:flex;flex-direction:column;align-items:flex-end}
.jobrow .jr-contract{font-weight:bold;color:var(--navy)}
.jobrow .jr-prog{flex:0 0 160px}
.jr-track{position:relative;height:9px;border-radius:5px;background:#dde4ec;overflow:hidden;margin-bottom:3px}
.jr-track i{position:absolute;left:0;top:0;bottom:0;border-radius:5px}
.jr-track .jr-cost{background:#f0b58e}
.jr-track .jr-bill{background:#2a78d6;height:5px;top:2px}
.jobrow .jr-flags{flex:1 1 150px;display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:700px){
  .jobrow{gap:8px}
  .jobrow .jr-prog{flex:1 1 100%}
  .jobrow .jr-flags{justify-content:flex-start}
}
#dashstats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}

/* ==== back-to-job chip (2026-08-20): visible on every tab once a job was opened ==== */
#backjob{float:right;font-size:12px;background:#2f6b46;color:#dff1e3;border-radius:12px;padding:3px 10px;margin-right:8px;cursor:pointer;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#backjob:hover{background:#398155;color:#fff}
#backjob.hidden{display:none}
@media(max-width:520px){#backjob{float:none;display:inline-block;margin-top:6px;max-width:96%}}
@media(min-width:1000px){
  #backjob{float:none;display:block;margin:8px 0 0;text-align:left;background:rgba(76,175,110,.18);color:#bfe8cb;border-radius:8px;padding:9px 12px;font-size:13px}
  #backjob:hover{background:rgba(76,175,110,.32);color:#fff}
  #backjob.hidden{display:none}
}
