/* Keep the established teal, porcelain and brass palette. */
:root{--muted:#6a5c75}
.sub,.statlabel,.statfoot,.savehint,.calcfooter,.sectiondesc,td small,.unit,.wf-entry small,.wf-photos small{color:#6a5c75;line-height:1.65}
.main>.topbar{gap:8px}.device-status{font-size:11px;color:#cdc3d4;line-height:1.5}.product-tools{align-items:center;gap:12px;margin:18px 0}.product-tools .all-projects{margin-left:auto}.product-tools button{min-height:40px;font-size:12px}.save-error{color:#ffd4a0!important}
.object-summary{margin:20px 0 24px;border:1px solid #8a789855;border-radius:14px;background:linear-gradient(130deg,#3c294b,#321d42);padding:24px;color:#f0e9f5;box-shadow:0 8px 32px #1a0c2613}.summary-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:22px}.summary-eyebrow{font-size:9px;letter-spacing:1.5px;color:#c3b2d0}.summary-head h2{font-size:22px;margin-top:7px;color:#f0e9f5}.summary-link{display:flex;align-items:center;gap:8px;font-size:12px;color:#e3d09e}.summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}.summary-metrics span{display:block;color:#c8bed0;font-size:11px;line-height:1.5;margin-bottom:7px}.summary-metrics strong{font-size:24px;letter-spacing:-.8px;white-space:nowrap}.summary-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;border-top:1px solid #9a8aa740;margin-top:22px;padding-top:17px;font-size:11px;color:#d4ccda;line-height:1.7}.summary-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.summary-actions .btn{min-height:44px}.summary-actions .primary{background:#e6c68d;color:#32243d;border-color:#e6c68d}.object-summary.compact{padding:20px}.compact .summary-head{margin-bottom:15px}.compact .summary-head h2{font-size:18px}.compact .summary-metrics strong{font-size:21px}.activity-card .minirow{font-size:12px}.activity-card small{white-space:nowrap;color:#6a5c75}.product-welcome{margin:10px 0 24px;border-bottom:1px solid #8a789855;color:#e2dae9}.product-welcome>summary{cursor:pointer;padding:14px 0;font-size:14px;list-style:none;font-weight:600}.product-welcome>summary span{float:right;font-size:11px;color:#c7bdce;font-weight:400}.product-welcome .electric-hero{margin-top:10px}.draft-label{grid-column:1/-1;font-size:9px;font-weight:700;letter-spacing:.7px;color:#655374;margin-bottom:15px}.calcresult .calc-review{font-size:12px!important;margin-top:14px;grid-column:1/-1}.calcresult .calcreset{color:#6a5c75;font-size:11px}.calcfooter,.calcname small,.calctoolbar button{color:#6a5c75}.calcqty button{color:#5b466c;min-height:44px}.calcqty input{min-height:44px}.calcname strong{font-size:12px}.calclayout>.calcresult{position:static}.review-lines{max-height:260px;overflow:auto}.review-lines .minirow strong{white-space:nowrap}.product-workcard .cardhead{flex-wrap:wrap}.product-workcard .cardhead .sub{font-size:11px}.work-item{border-bottom:1px solid var(--line);background:#fff}.work-item:last-child{border-bottom:0}.work-item>summary{list-style:none;display:flex;justify-content:space-between;gap:18px;padding:19px 22px;cursor:pointer}.work-item>summary::-webkit-details-marker,.material-settings>summary::-webkit-details-marker{display:none}.work-copy{min-width:0}.work-copy>strong{font-size:13px;line-height:1.5;display:block}.work-copy>span{display:block;font-size:11px;color:#6a5c75;margin-top:6px;line-height:1.6}.work-cost{text-align:right;flex-shrink:0}.work-cost>strong{display:block;font-size:15px;white-space:nowrap;line-height:1.7}.work-cost>span{display:block;font-size:11px;color:#5d4470;margin-top:8px}.work-item[open]{background:#f7f4fa}.work-editor{padding:0 22px 20px}.work-editor .fields{grid-template-columns:repeat(3,1fr)}.work-editor .field{margin-bottom:12px}.editor-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;flex-wrap:wrap;color:#6a5c75}.editor-bottom .linkbtn{min-height:40px}.material-item{padding:22px;border-bottom:1px solid var(--line)}.material-item:last-child{border-bottom:0}.material-main{display:flex;align-items:flex-start;gap:14px}.material-main>div:last-child{min-width:0;flex:1}.material-main h3{font-size:14px;line-height:1.5;margin:0}.material-main p{font-size:12px;color:#6a5c75;margin:7px 0;line-height:1.7}.material-status{display:grid;place-items:center;width:34px;height:34px;border:1px solid #d7cddf;border-radius:9px;color:#644d76;background:#f1ebf5;flex-shrink:0}.material-complete .material-status{background:#e9dff0;color:#4c355e}.material-remaining{font-size:12px;font-weight:700;color:#583d6e;line-height:1.6}.material-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-left:48px;margin-top:12px}.buyer-label{font-size:11px;color:#6a5c75}.material-actions .btn{min-height:42px;min-width:110px}.material-settings{margin-left:48px;margin-top:10px}.material-settings>summary{list-style:none;font-size:11px;color:#6a5c75;cursor:pointer;min-height:40px;display:flex;align-items:center}.material-editor{padding:10px 0}.material-editor .linkbtn{min-height:40px}.material-editor .savehint{font-size:11px}.purchase-remaining{padding:11px 14px;background:#ece4f3;color:#4f3662;border-radius:8px;font-size:12px}.transaction-item{display:flex;gap:18px;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line)}.transaction-item:last-child{border:0}.transaction-copy{min-width:0;flex:1}.transaction-copy>strong{font-size:13px;line-height:1.5;display:block;overflow-wrap:anywhere}.transaction-copy>small{display:block;font-size:11px;color:#6a5c75;margin-top:7px;line-height:1.6}.transaction-copy .badge{margin-top:8px}.transaction-amount{display:flex;align-items:flex-start;gap:10px;flex-shrink:0}.transaction-amount>strong{font-size:14px;line-height:2.3;white-space:nowrap}.delete{min-width:40px;min-height:40px}.moneyminus{color:#92603c}.moneyplus{color:#54366c}.undo-toast{display:flex;align-items:center;gap:30px}.undo-toast button{color:#eddaa1;font-weight:700;min-height:32px}.pdf-preview{margin-top:15px}.pdf-preview summary{font-size:12px;color:#583d6e;padding:12px 0;cursor:pointer}.pdf-preview iframe{width:100%;height:430px;border:1px solid var(--line);border-radius:8px}.modalfoot .btn{min-height:44px}.field input,.field select{min-height:44px}.field input:disabled,.field select:disabled{opacity:.65}.statfoot{font-size:11px}.statlabel{font-size:12px}.product-materials .cardhead .sub{font-size:11px}.saved{max-width:190px}.settingsrow p,.minirow small{color:#6a5c75}
@media(max-width:800px){.product-tools{gap:9px;flex-wrap:wrap;margin:12px 0}.product-tools button{padding:8px 11px}.product-tools .device-status{font-size:10px;max-width:150px}.product-tools .all-projects{padding:8px 0;border:0;background:none;font-size:11px}.object-summary{padding:18px;margin:14px 0 22px}.summary-head{align-items:flex-start;margin-bottom:18px}.summary-head h2{font-size:20px}.summary-link{font-size:10px;max-width:100px;line-height:1.5}.summary-link svg{width:15px}.summary-metrics{grid-template-columns:1fr 1fr;gap:18px 14px}.summary-metrics strong{font-size:23px}.summary-metrics span{font-size:11px}.summary-bottom{font-size:11px;margin-top:18px}.summary-actions{display:grid;grid-template-columns:1fr 1fr}.summary-actions .btn:first-child{grid-column:1/-1}.summary-actions .btn{white-space:normal;font-size:12px;padding:12px 8px}.object-summary.compact{padding:16px}.compact .summary-head h2{font-size:17px}.compact .summary-metrics{gap:13px}.compact .summary-metrics strong{font-size:20px}.compact .summary-metrics span{font-size:10px}.product-welcome{margin-bottom:20px}.product-welcome>summary{font-size:12px}.product-welcome>summary span{font-size:10px}.calclayout>.calcresult{display:flex;flex-direction:column;gap:0;padding:18px}.calcresult .meter-top{display:none}.calcresult .meter-screen{padding:15px;width:100%}.calcresult .big{font-size:32px;margin:10px 0}.calcresult .meter-caption{font-size:8px}.calcresult .minirow{display:flex;width:100%;padding:10px 0;font-size:11px;border-bottom:1px solid #e0d8e6}.calcresult .minirow strong{font-size:12px}.calcresult .calc-review{order:1;width:100%}.calcresult [data-act="calc-share"]{order:2;width:100%;margin-top:9px!important}.calcresult [data-act="calc-download"]{order:3;width:100%}.calcresult [data-act="calc-reset"]{order:4}.calcresult .simplenote{order:5;font-size:10px;line-height:1.7}.calcresult .draft-label{font-size:9px;margin-bottom:12px}.calclayout>.card{order:0}.calclayout>.calcresult{order:1}.calclayout{display:flex;flex-direction:column}.calclayout>.card,.calclayout>.calcresult{width:100%}.calcname strong{font-size:12px}.calcname small{font-size:11px}.calcrow{grid-template-columns:36px minmax(0,1fr) 112px;gap:9px}.work-device{width:36px;height:40px}.work-device svg{width:29px;height:33px}.calcqty button{width:28px}.calcqty input{font-size:16px}.calcrate input{font-size:16px}.calcfooter{font-size:11px;line-height:1.7}.calclink{font-size:12px;min-height:44px}.work-item>summary{padding:16px;gap:12px}.work-copy>strong{font-size:13px}.work-copy>span{font-size:11px}.work-cost>strong{font-size:14px}.work-cost{max-width:110px}.work-editor{padding:0 16px 16px}.work-editor .fields{grid-template-columns:1fr 1fr}.work-editor .field input{font-size:16px}.work-editor .fields .field:last-child{grid-column:1/-1;max-width:calc(50% - 5px)}.editor-bottom{font-size:11px}.material-item{padding:18px 16px}.material-main{gap:11px}.material-main h3{font-size:14px}.material-actions{padding-left:45px}.material-settings{margin-left:45px}.material-main p{font-size:11px}.material-remaining{font-size:12px}.material-editor input,.material-editor select{font-size:16px}.material-editor .fields{grid-template-columns:1fr}.material-editor .field{margin-bottom:2px}.transaction-item{gap:10px;flex-wrap:wrap}.transaction-copy{flex-basis:55%}.transaction-amount{gap:3px}.transaction-amount>strong{font-size:13px}.transaction-copy .wf-buyer{font-size:12px;max-width:100%;min-height:40px}.mobilebar button{font-size:10px;min-height:44px;color:#6b5c76}.mobilebar button.active{color:#735c31}.stat{padding:17px 14px}.statlabel{font-size:11px}.statfoot{font-size:10px}.statvalue{font-size:24px}.product-workcard .cardhead .badge{font-size:10px}.heading .sub{font-size:12px}.cardhead h2{font-size:17px}.main{padding-bottom:calc(100px + env(safe-area-inset-bottom))}.field input,.field select,.search,.chip{font-size:16px}.product-tools button{font-size:11px}.topright{gap:8px}.topbar .projectselect{font-size:12px;max-width:160px}.modalback{padding:10px}.modal{max-height:calc(100dvh - 20px)}.modalbody{padding:18px}.modalfoot{padding:14px 18px}.wf-finance .minirow{grid-template-columns:minmax(95px,1fr) 80px 80px}.estimate-materials-table td:first-child{min-width:0}.pdf-preview iframe{height:340px}}
@media(max-width:380px){.summary-metrics strong{font-size:20px}.compact .summary-metrics strong{font-size:19px}.product-tools .device-status{max-width:120px;font-size:9px}.product-tools .all-projects{font-size:10px}.calcrow{grid-template-columns:minmax(0,1fr) 104px;gap:8px}.calcrow .work-device{display:none}.calcrate{grid-column:1/-1}.statvalue{font-size:21px}.work-item>summary{gap:8px}.work-cost{max-width:100px}.work-cost>strong{font-size:13px}.transaction-amount>strong{font-size:12px}.transaction-copy{flex-basis:50%}.material-actions,.material-settings{padding-left:0;margin-left:0}}
@media print{.product-tools,.object-summary,.product-welcome,.activity-card,.work-editor,.work-cost>span,.draft-label{display:none!important}.work-item>summary{padding:10px 0;break-inside:avoid}.work-copy>span{font-size:10px}.work-copy>span:nth-of-type(1){display:none}.work-item{border-bottom:1px solid #ddd}.product-workcard .cardhead .sub{display:none}.material-settings,.material-actions{display:none}.transaction-item{break-inside:avoid}}
/* Prevent wide dialogs from expanding the overlay's intrinsic grid track. */
.modalback{display:flex;align-items:center;justify-content:center;overflow:auto}.modal{min-width:0;flex-shrink:1;width:min(570px,100%)}.modal.wide{width:min(850px,100%)}.modalbody{min-width:0}.modalfoot .btn{white-space:normal;text-align:center}.review-lines{min-width:0}
.summary-actions .btn{color:#33263e}.summary-actions .btn.primary{color:#32243d}
/* The object opens where work was left; the mobile calculator keeps its total in reach. */
.calculator-object-summary{margin:16px 0 20px;border:1px solid #9c8ca942;border-radius:10px;color:#ebe4f1;background:#311b4233}.calculator-object-summary>summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;padding:14px 16px;font-size:12px}.calculator-object-summary>summary::-webkit-details-marker{display:none}.calculator-object-summary>summary strong{margin-left:auto;font-size:15px;white-space:nowrap}.calculator-object-summary>summary>span:last-child{font-size:10px;color:#c9bfd0}.calculator-object-summary .object-summary{margin:0;border:0;border-top:1px solid #9c8ca930;border-radius:0 0 10px 10px}.calc-livebar{display:none}.card .sub,.card .sectiondesc,.modal .sectiondesc,.card .exportnote,.card .bottomnote{color:#61546c}.work-item>summary:focus-visible,.material-settings>summary:focus-visible,.calculator-object-summary>summary:focus-visible{outline:3px solid #834eac;outline-offset:-3px}#objectDetails{scroll-margin-top:16px}
@media(max-width:800px){.calculator-object-summary{margin:12px 0}.calculator-object-summary>summary{padding:12px;font-size:11px;gap:8px}.calculator-object-summary>summary strong{font-size:14px}.calculator-object-summary>summary>span:last-child{font-size:9px}.calculator-active .main{padding-bottom:calc(170px + env(safe-area-inset-bottom))}.calc-livebar{position:fixed;display:flex;align-items:center;justify-content:space-between;gap:14px;left:0;right:0;bottom:var(--volt-nav-height,65px);z-index:31;padding:10px 18px;background:#352046;color:#f5f4e6;border-top:1px solid #b6a9c155;box-shadow:0 -4px 20px #1c0d2833}.calc-livebar>div{min-width:0}.calc-livebar>div>span{display:block;font-size:10px;color:#d2cad8;line-height:1.6}.calc-livebar strong{font-size:22px;letter-spacing:-.6px;white-space:nowrap}.calc-livebar .btn{min-height:44px;background:#e4c68e;color:#33263e;border-color:#e4c68e;font-size:12px;padding:10px 13px}.calculator-active .toast{bottom:calc(var(--volt-nav-height,65px) + 80px)}.keyboard-open .calc-livebar{display:none}.estimate-materials-card thead{display:none}.estimate-materials-card table,.estimate-materials-card tbody{display:block}.estimate-materials-card tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 8px;padding:16px;border-bottom:1px solid var(--line)}.estimate-materials-card td{padding:0;border:0;min-width:0!important;font-size:12px;text-align:left;overflow-wrap:anywhere}.estimate-materials-card td:first-child{grid-column:1/-1;font-weight:700;font-size:13px;line-height:1.5}.estimate-materials-card td:not(:first-child):before{display:block;font-size:10px;color:#61546c;margin-bottom:5px}.estimate-materials-card td:nth-child(2):before{content:'Количество'}.estimate-materials-card td:nth-child(3):before{content:'Цена'}.estimate-materials-card td:nth-child(4):before{content:'Сумма'}.estimate-materials-card tr:last-child{border-bottom:0}.estimate-materials-card .cardhead{flex-wrap:wrap}.estimate-materials-card .cardbody .minirow{align-items:flex-start;line-height:1.6}.estimate-materials-card .cardbody .minirow strong{white-space:nowrap}.estimate-materials-card .totalrow{gap:12px}}
@media print{.calculator-object-summary,.calc-livebar{display:none!important}}

/* Restore the animated electrical identity in the working calculator. */
.product-welcome{border:0;margin:12px 0 24px}.product-welcome>summary{color:#ecd39f}.product-welcome .electric-hero{box-shadow:0 16px 45px #1f0f2c44,0 0 35px #ab86c812}.object-summary{position:relative;overflow:hidden}.object-summary:before{content:'';position:absolute;top:0;left:0;width:100%;height:2px;background:linear-gradient(90deg,transparent,#ead39b,#bb9bd5,transparent);background-size:200% 100%;animation:volt-current 7s linear infinite}.stat{transition:transform .25s,box-shadow .25s}.stat:hover{transform:translateY(-3px);box-shadow:0 12px 24px #190c2333}.stat.highlight{background:linear-gradient(135deg,#e8dcf2,#dbc9e9)}.calc-livebar strong{color:#f3d79d;text-shadow:0 0 18px #f3d79d22}.material-status{box-shadow:0 0 0 4px #a389b70b}.work-item[open]{box-shadow:inset 3px 0 #a181ba}.summary-head h2{letter-spacing:-.6px}.product-welcome .hero-copy h1{filter:drop-shadow(0 2px 15px #190c2433)}
@keyframes volt-current{from{background-position:200% 0}to{background-position:0 0}}
@media(prefers-reduced-motion:reduce){.object-summary:before{animation:none}.stat{transition:none}}
