#app .crm-project-cost-row{min-width:0;}
#app .shell.dalux-layout .module-nav .module-item-row.crm-project-cost-row > button.module-item.crm-project-cost-tile{position:relative;isolation:isolate;overflow:visible!important;border:2px solid var(--tile-outline,#519dcc)!important;border-radius:12px!important;background:var(--crm-nav-rest,var(--panel,#14232e))!important;box-shadow:none!important;min-height:56px;}
.crm-cost-orbit{position:absolute;inset:-2px;width:calc(100% + 4px);height:calc(100% + 4px);overflow:visible;pointer-events:none;border-radius:inherit;}
.crm-cost-orbit rect{fill:none;stroke:#54bdff;stroke-width:3.5;stroke-linecap:butt;stroke-dasharray:.81 99.19;animation:crm-cost-orbit 5s linear infinite;}
.crm-cost-orbit .crm-cost-trail{filter:none;shape-rendering:geometricPrecision;}
.crm-cost-orbit .crm-cost-spark{stroke:#e4f8ff;stroke-width:4.5;stroke-linecap:round;stroke-dasharray:1.4 98.6;filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 5px #49c1ff);animation:crm-cost-orbit 5s linear infinite,crm-cost-wave 1.4s ease-in-out infinite;}
@keyframes crm-cost-wave{0%,100%{opacity:.75;stroke-width:3.5;}50%{opacity:1;stroke-width:5.5;}}
@keyframes crm-cost-orbit{from{stroke-dashoffset:var(--orbit-offset,0);}to{stroke-dashoffset:calc(var(--orbit-offset,0) + 100);}}
.crm-cost-placeholder{width:min(580px,calc(100vw - 32px));min-height:180px;box-sizing:border-box;border:1px solid var(--line,#519dcc);border-radius:16px;color:var(--ink,#b8d0df);background:var(--panel,#14232e);padding:20px;}
.crm-cost-placeholder::backdrop{background:#0008;}
.crm-cost-placeholder header{display:flex;align-items:center;justify-content:space-between;gap:16px;}
.crm-cost-placeholder h2{margin:0;font-size:24px;}
.crm-cost-placeholder header>button{width:44px;height:44px;font-size:28px;color:inherit;background:transparent;border:1px solid var(--line,#519dcc);border-radius:10px;}
@media(prefers-reduced-motion:reduce){.crm-cost-orbit rect{animation:none;}}

.crm-cost-glow-clip{position:absolute;inset:0;overflow:hidden;border-radius:10px;pointer-events:none;}
.crm-cost-glow-cloud{position:absolute;left:0;top:0;width:140px;height:100px;background:radial-gradient(ellipse at center,rgba(67,175,255,.25) 0%,rgba(56,160,245,.12) 32%,rgba(38,145,235,.035) 58%,transparent 76%);filter:blur(12px);pointer-events:none;will-change:transform;}

.crm-cost-panel{width:min(840px,calc(100vw - 24px));height:min(90dvh,950px);max-height:90dvh;padding:0;overflow:auto;color:var(--ink,#23465d);background:var(--panel,#fff);}
.crm-cost-panel>header{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;padding:14px 18px;background:var(--panel,#fff);border-bottom:1px solid var(--line,#c1d3df);}
.crm-cost-panel>header h2{grid-column:2;text-align:center;align-self:center;}
.crm-cost-panel>header>button{grid-column:3;}
.crm-cost-panel-body{padding:18px 22px 28px;}
.crm-cost-source{font-size:13px;line-height:1.6;color:var(--muted,#637d91);margin:0 0 20px;}
.crm-cost-section{margin:0 0 24px;}
.crm-cost-section h3{font-size:17px;line-height:1.45;margin:0 0 10px;}
.crm-cost-data-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;padding:12px 0;border-bottom:1px solid var(--line,#c1d3df);font-size:14px;align-items:start;}
.crm-cost-data-row strong{font-weight:500;overflow-wrap:anywhere;}
.crm-cost-data-row small{display:block;font-size:12px;color:var(--muted,#637d91);margin-top:4px;}
.crm-cost-data-row>b{font-size:14px;white-space:nowrap;}
.crm-cost-data-row details{font-size:12px;margin-top:6px;color:var(--muted,#637d91);}
.crm-cost-data-row details p{line-height:1.6;margin:6px 0 0;}
.crm-cost-data-row summary,.crm-cost-checks summary{cursor:pointer;}
.crm-cost-total,.crm-cost-grand-total{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 0;font-size:14px;}
.crm-cost-grand-total{border:1px solid var(--line,#519dcc);border-radius:10px;padding:16px;margin:0 0 26px;background:rgba(38,145,220,.08);font-size:16px;}
.crm-cost-forecast>p,.crm-cost-checks li{font-size:13px;line-height:1.6;color:var(--muted,#637d91);}
.crm-cost-checks ul{padding-left:20px;}.crm-cost-checks li{margin:10px 0;}
@media(max-width:480px){.crm-cost-panel-body{padding:14px;}.crm-cost-data-row{gap:10px;}.crm-cost-data-row>b{font-size:12px;}.crm-cost-panel>header{padding:10px 14px;}}

.crm-cost-scenarios{margin:28px 0;padding-top:20px;border-top:1px solid var(--line,#519dcc);}
.crm-cost-scenarios h3{font-size:18px;margin:0 0 10px;}.crm-cost-scenarios p{font-size:13px;color:var(--muted,#637d91);line-height:1.6;}
.crm-cost-week-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0;}
.crm-cost-week-actions button,.crm-cost-staff-control button{border:1px solid var(--line,#519dcc);border-radius:9px;background:transparent;color:inherit;min-height:42px;padding:8px 12px;font:inherit;font-size:13px;cursor:pointer;}
.crm-cost-week-actions button[aria-pressed="true"]{border-color:#48b8ff;background:rgba(45,153,220,.18);}
.crm-cost-scenarios button:disabled{opacity:.35;cursor:default;}
.crm-cost-weeks-step,.crm-cost-staff-control>div{display:flex;align-items:center;gap:10px;}
.crm-cost-weeks-step b,.crm-cost-staff-control b{min-width:20px;text-align:center;}
.crm-cost-scenario-result{display:grid;gap:8px;border:1px solid var(--line,#519dcc);border-radius:12px;padding:16px;margin:16px 0;background:rgba(45,153,220,.08);}
.crm-cost-scenario-result>b{font-size:23px;}.crm-cost-scenario-result small{font-size:13px;color:var(--muted,#637d91);}
.crm-cost-staff-weeks{display:grid;gap:12px;margin:16px 0;}
.crm-cost-staff-week{border:1px solid var(--line,#519dcc);border-radius:10px;padding:12px;}
.crm-cost-staff-week>strong{display:block;font-size:14px;}.crm-cost-staff-week>strong small{font-weight:400;color:var(--muted,#637d91);}
.crm-cost-staff-control{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;font-size:14px;}
.crm-cost-staff-control button{width:40px;padding:6px;}.crm-cost-scenario-basis{margin-top:16px;font-size:13px;}
.crm-cost-scenario-line{display:flex;align-items:start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line,#519dcc);padding:8px 0;}.crm-cost-scenario-line b{white-space:nowrap;}

.crm-cost-pinned-totals{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;padding-top:10px;}
.crm-cost-pinned-totals>div{min-width:0;display:grid;gap:4px;align-content:start;}
.crm-cost-pinned-totals span{font-size:12px;line-height:1.4;color:var(--muted,#637d91);}
.crm-cost-pinned-totals b{font-size:clamp(15px,3.8vw,20px);line-height:1.3;overflow-wrap:anywhere;}
.crm-cost-pinned-totals>small{grid-column:1/-1;font-size:11px;color:var(--muted,#637d91);}
.crm-cost-panel{scroll-padding-top:160px;}

.crm-cost-pinned-totals>div>small{font-size:11px;color:var(--muted,#637d91);line-height:1.4;}

.crm-cost-pinned-totals>.crm-cost-quick-weeks{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) 44px 28px 44px;align-items:center;gap:6px;min-width:0;margin-top:4px;}
.crm-cost-quick-weeks>button{box-sizing:border-box;width:44px;height:44px;min-height:44px;padding:6px;font:inherit;font-size:22px;line-height:1;color:inherit;background:transparent;border:1px solid var(--line,#519dcc);border-radius:10px;cursor:pointer;}
.crm-cost-quick-weeks>button:disabled{opacity:.35;cursor:default;}
.crm-cost-quick-weeks>[data-cost-quick-count]{text-align:center;font-size:16px;}


#app .shell.dalux-layout .project-nav-block>button.crm-has-project-cost{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;}
#app .shell.dalux-layout button .crm-project-cost-badge{display:grid!important;gap:3px!important;justify-items:end!important;align-content:center!important;max-width:155px!important;min-width:0!important;text-align:right!important;line-height:1.3!important;}
#app .shell.dalux-layout button .crm-project-cost-badge b{font-size:14px!important;font-weight:650!important;white-space:normal!important;overflow-wrap:anywhere!important;}
#app .shell.dalux-layout button .crm-project-cost-badge small{font-size:11px!important;font-weight:400!important;line-height:1.3!important;color:var(--muted,#637d91)!important;}

/* Documented amounts open their private source without losing the cost scroll position. */
.crm-cost-data-row .crm-cost-receipt-amount{width:auto;min-width:0;min-height:36px;height:auto;padding:5px 8px;margin:-5px -8px 0 0;border:1px solid #49b7ee88;border-radius:9px;color:var(--ink,#173d55);background:linear-gradient(135deg,#36aeed25,#36aeed08);box-shadow:inset 0 0 12px #36aeed20;font-family:inherit;font-size:14px;font-weight:700;white-space:nowrap;text-decoration:underline;text-decoration-color:#49b7ee99;text-underline-offset:4px;cursor:pointer;}
.crm-cost-data-row .crm-cost-receipt-amount:hover,.crm-cost-data-row .crm-cost-receipt-amount:focus-visible{background:#36aeed30;outline:2px solid #49b7ee;outline-offset:2px;}
.crm-cost-receipt-dialog{width:min(1000px,96vw);height:92dvh;max-height:92dvh;box-sizing:border-box;padding:12px;border:1px solid var(--line,#8ba8bc);border-radius:16px;background:var(--panel,#172532);color:var(--ink,#173d55);overflow:hidden;}
.crm-cost-receipt-dialog::backdrop{background:#0009;}
.crm-cost-receipt-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;min-height:44px;}
.crm-cost-receipt-dialog>header strong{min-width:0;overflow-wrap:anywhere;}
.crm-cost-receipt-dialog>header button{width:44px;height:44px;flex:none;padding:0;font-size:26px;}
.crm-cost-receipt-dialog>iframe,.crm-cost-receipt-dialog>img{display:block;width:100%;height:calc(100% - 54px);border:0;object-fit:contain;background:#fff;border-radius:8px;}

.crm-cost-receipt-pages{height:calc(100% - 54px);overflow:auto;overscroll-behavior:contain;padding:12px;box-sizing:border-box;background:#7773;border-radius:8px;text-align:center;}
.crm-cost-receipt-pages canvas{display:block;height:auto;margin:0 auto 12px;background:white;}

.crm-cost-receipt-dialog[open]{display:flex;flex-direction:column;}
.crm-cost-receipt-dialog>.crm-cost-receipt-pages{height:auto;flex:1;min-height:0;}
.crm-cost-receipt-controls{display:flex;align-items:center;justify-content:center;gap:12px;padding-top:10px;flex:none;}
.crm-cost-receipt-controls>button{width:40px;height:40px;padding:0;font-size:22px;}
.crm-cost-receipt-controls>span{white-space:nowrap;font-size:14px;}
.crm-cost-receipt-controls>a{color:var(--accent-dark,#2d82bc);font-size:14px;}
