:root{--crm-workspace:#f5f5f2;--crm-surface:#fff;--crm-border:#e1e4dd;--crm-primary:#285c43}
/* Product document library */
.has-document-catalog>:not(.library-head):not(.document-catalog){display:none!important}.has-document-catalog .library-head{order:0}.has-document-catalog{display:flex;flex-direction:column}.document-catalog{order:1;min-width:0}.has-document-catalog .library-back,.has-document-catalog .library-jump{display:none!important}
.dc-toolbar{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin:8px 0 18px}.dc-toolbar label,.dc-kinds label,.dc-form>label{display:grid;gap:7px;font-size:.85rem;font-weight:600}.dc-search{flex:1;min-width:240px}.dc-toolbar input,.dc-toolbar select,.dc-form input:not([type=checkbox]),.dc-form select,.dc-kinds select{width:100%;min-height:44px;border:1px solid #d6e3d9;border-radius:10px;padding:10px 12px;background:#fff;color:#193b2c;font:inherit}.dc-status{min-height:20px;color:#37624b}.dc-status.is-error{color:#a62f24}.dc-crumbs{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0 22px}.dc-crumbs button{border:0;background:transparent;color:#226546;padding:5px 0}.dc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.dc-category{text-align:left;display:flex;flex-direction:column;gap:12px;background:#fff;border:1px solid #dce5de;border-radius:18px;padding:24px;color:#173a2c;min-height:210px;box-shadow:0 4px 18px #17452b05;transition:border-color .15s,transform .15s}.dc-category:hover{border-color:#72a67c;transform:translateY(-2px)}.dc-category:focus-visible{outline:3px solid #b7db43;outline-offset:3px}.dc-category strong{font-size:1.14rem}.dc-category small{color:#617168;line-height:1.5}.dc-symbol{width:40px;height:40px;border-radius:12px;background:#edf5de;display:grid;place-items:center;font-size:26px;font-weight:500}.dc-count{border-top:1px solid #edf0ea;margin-top:auto;padding-top:12px;font-size:.8rem;color:#617168;display:flex;justify-content:space-between}.dc-fotovoltaico .dc-symbol,.dc-wallbox .dc-symbol{background:#fff3cb}.dc-clima .dc-symbol,.dc-pompe .dc-symbol{background:#e8f3f4}.dc-branches{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.dc-branches button{border:1px solid #d8e3da;border-radius:24px;padding:10px 20px;background:#fff;color:#284637}.dc-branches button[aria-pressed=true]{background:#173e2c;color:white;border-color:#173e2c}.dc-kinds,.dc-list-head,.dc-bulk{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-wrap:wrap;margin:16px 0}.dc-list-head h2{font-size:1.25rem;margin:12px 0}.dc-bulk{justify-content:flex-start;padding:14px;background:#f1f6ed;border-radius:12px}.dc-bulk label{display:flex;gap:8px;align-items:center;font-size:.85rem}.document-catalog input[type=checkbox]{width:18px;height:18px;min-height:18px;accent-color:#2c714b}.dc-group{margin:26px 0}.dc-group h3{font-size:.92rem;letter-spacing:.02em;padding-bottom:12px;border-bottom:2px solid #d3e68d}.dc-document{display:flex;align-items:center;gap:16px;padding:20px 0;border-bottom:1px solid #e3e9e1}.dc-file{flex:1;min-width:0;display:grid;gap:7px}.dc-file strong{font-size:.96rem;overflow-wrap:anywhere}.dc-file small{color:#69756e;overflow-wrap:anywhere}.dc-meta{display:flex;gap:8px 16px;flex-wrap:wrap;font-size:.77rem;color:#607167}.dc-expiry{color:#287149;font-weight:600}.dc-expiry.is-expired{color:#a44430}.dc-actions{display:flex;flex-wrap:wrap;gap:8px;max-width:330px;justify-content:flex-end}.dc-actions button,.dc-actions a,.dc-bulk button{font-size:.8rem;padding:8px 12px;border:1px solid #d5e1d5;border-radius:8px;background:#fff;color:#24563a;text-decoration:none;min-height:36px}.dc-empty{padding:36px;text-align:center;border:1px dashed #cbdacb;border-radius:14px;color:#66766c}.dc-approvals.library-layout{display:block;margin:28px 0}.dc-dialog{width:min(780px,94vw);max-height:92vh;overflow:auto;border:1px solid #d4e0d4;border-radius:18px;padding:24px;color:#234232}.dc-dialog::backdrop{background:#102d2366}.dc-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.dc-dialog h2{font-size:1.25rem;margin:0}.dc-dialog button{cursor:pointer}.dc-form{display:grid;grid-template-columns:1fr 1fr;gap:18px}.dc-wide{grid-column:1/-1}.dc-form small{font-weight:400;color:#637369}.dc-form fieldset{display:flex;flex-wrap:wrap;gap:16px;border:1px solid #d8e4d8;border-radius:12px;padding:16px}.dc-form fieldset label{display:flex;align-items:center;gap:8px;font-size:.85rem}.dc-drop{border:1px dashed #92ad8b;border-radius:12px;padding:20px;background:#f7faf3}.dc-form-actions{display:flex;gap:12px}.dc-form-status{white-space:pre-wrap;color:#376646;overflow-wrap:anywhere}.dc-queue-row{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e1e8de}.dc-queue-row span{display:grid;gap:6px;overflow-wrap:anywhere;min-width:0}.dc-history{display:grid;gap:10px;padding:18px 0;border-bottom:1px solid #dde7db}.dc-preview{width:min(1100px,94vw);height:90vh}.dc-preview .dc-dialog-body{height:calc(100% - 65px)}.dc-preview iframe{width:100%;height:100%;border:0}.dc-preview img{max-width:100%;max-height:100%;object-fit:contain}
@media(max-width:1050px){.dc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dc-document{flex-wrap:wrap}.dc-actions{max-width:none;width:100%;justify-content:flex-start;margin-left:34px}}@media(max-width:600px){.dc-grid{grid-template-columns:1fr}.dc-category{min-height:170px}.dc-toolbar>*{width:100%}.dc-form{grid-template-columns:1fr}.dc-form>*{grid-column:1}.dc-dialog{padding:18px}.dc-meta{flex-direction:column;gap:6px}.dc-bulk{align-items:flex-start}.dc-search{min-width:0}}

/* Refined GreenTech document library */
.document-catalog{--dc-ink:#234734;padding-top:4px}
.document-catalog .dc-toolbar{padding:20px;background:#faf9f4;border:1px solid #e7e7dd;border-radius:14px;gap:12px;margin-top:6px}
.document-catalog .dc-toolbar label{color:#526256;font-weight:550}.document-catalog .dc-toolbar input,.document-catalog .dc-toolbar select{background:#fff;border-color:#dfe3da;border-radius:9px}.document-catalog .dc-toolbar input:focus,.document-catalog .dc-toolbar select:focus{outline:2px solid #a8bd98;outline-offset:2px}
.document-catalog .primary{background:#285c43;border-color:#285c43;color:#fff;box-shadow:none}.document-catalog .primary:hover{background:#1f4d37}.document-catalog .dc-toolbar .secondary{background:#fff;border-color:#dce2d7;color:#3a5942}
.dc-intro{margin:8px 0 18px}.dc-intro h2{font-size:1.15rem;font-weight:600;letter-spacing:-.02em;color:#2d4d39;margin:0}.document-catalog .dc-crumbs{margin-bottom:18px}.document-catalog .dc-crumbs button{color:#4d6a51;font-weight:500}
.document-catalog .dc-category{min-height:208px;border:1px solid #e0e5db;border-radius:14px;background:#fffefa;padding:24px;gap:12px;box-shadow:0 3px 12px #334e3004;transition:border-color .15s,box-shadow .15s}.document-catalog .dc-category:hover{border-color:#91aa87;box-shadow:0 6px 20px #334e300a;transform:none}.document-catalog .dc-category strong{font-weight:600;color:#254a35;line-height:1.35;font-size:1.04rem}.document-catalog .dc-category small{font-weight:400;color:#7c8477;font-size:.78rem;line-height:1.65}.document-catalog .dc-symbol{width:42px;height:42px;border-radius:11px;background:#f0f3e9;color:#577650;margin-bottom:4px}.dc-symbol svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.document-catalog .dc-count{border-color:#e9ece3;color:#7b8474;font-size:.76rem;font-weight:450}.document-catalog .dc-count>span{color:#748e62}
.document-catalog .dc-branches button{background:#fffef9;border-color:#dfe4d8;border-radius:20px;color:#52644b}.document-catalog .dc-branches button[aria-pressed=true]{background:#315c43;color:#fff;border-color:#315c43;box-shadow:none}.document-catalog .dc-bulk{background:#f5f6ef;border:1px solid #e7eadd;border-radius:10px}.document-catalog .dc-group{padding:18px 22px;background:#fffefa;border:1px solid #e5e8df;border-radius:14px}.document-catalog .dc-group h3{border-color:#dce4cd;color:#4e6544;padding-bottom:14px;margin:0;font-weight:600}.document-catalog .dc-document:last-child{border-bottom:0}.document-catalog .dc-document{border-color:#e9ece3}.document-catalog .dc-actions button,.document-catalog .dc-actions a{border-color:#dfe5d8;background:#fff}.document-catalog .dc-file strong{color:#2b4d37;font-weight:600}.document-catalog .dc-expiry{color:#5a7a3f}.document-catalog .dc-expiry.is-expired{color:#a44430}.document-catalog .dc-empty{background:#fdfcf7;border-color:#dfe5d6}.document-catalog .dc-dialog{background:#fffefa;border-color:#dfe4d7;box-shadow:0 24px 70px #20392326}.document-catalog .dc-drop{background:#f5f7ee;border-color:#b4c1a4}
@media(min-width:1450px){.document-catalog .dc-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:600px){.document-catalog .dc-toolbar{padding:16px}.document-catalog .dc-category{min-height:180px;padding:20px}.document-catalog .dc-group{padding:14px}}
@media(prefers-reduced-motion:reduce){.document-catalog .dc-category{transition:none}}

/* Location and solid icon treatment */
.document-catalog .dc-symbol{background:#188c66;color:#fffdf3;width:48px;height:48px;border-radius:11px}
.document-catalog .dc-symbol svg{width:28px;height:28px;stroke-width:1.7}
.document-catalog .dc-crumbs{padding:0 0 14px;border-bottom:1px solid #e2e4dc;gap:10px;font-size:.84rem;margin-bottom:24px}
.document-catalog .dc-crumbs button{color:#767b70;font-weight:400}
.document-catalog .dc-crumbs [aria-current=page]{color:#343b31;font-weight:600}
.document-catalog .dc-crumbs>span{color:#92988a}
.dc-location{display:flex;align-items:center;gap:16px;margin:0 0 25px}
.dc-location-icon{display:grid;place-items:center;flex:none;width:52px;height:52px;border-radius:12px;background:#188c66;color:#fffdf3}
.dc-location-icon svg{width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dc-location h2{font-size:1.6rem;font-weight:600;letter-spacing:-.025em;color:#343b31;line-height:1.2;margin:0}
.dc-location p{font-size:.86rem;font-weight:400;color:#777d70;margin:5px 0}
.dc-location p:first-child{margin:0 0 6px}
.document-catalog .dc-branches button{color:#666d5e;border-radius:10px}
.document-catalog .dc-branches button[aria-pressed=true]{background:#42443f;color:#fffdf3;border-color:#42443f;box-shadow:none;font-weight:600}
@media(max-width:600px){.dc-location h2{font-size:1.35rem}.document-catalog .dc-crumbs{gap:8px}.dc-location{gap:12px}}

/* Neutral working surfaces throughout CRM */
#app-view.app-shell{background:#f5f5f2}
#app-view.app-shell .sidebar{background:#fff}
#app-view.app-shell .workspace{background:#f5f5f2}
#app-view.app-shell .app-section{background:transparent}
#app-view.app-shell :is(.page-head,.archive-head,.bo-workdesk){background:#fff;border-color:#e1e4dd}
#app-view.app-shell :is(.admin-control-grid,.bo-priority-grid) button{background:#fff;border-color:#e1e4dd}
#app-view.app-shell :is(.admin-control-grid,.bo-priority-grid) button.is-selected{background:#eef1e9;border-color:#b8c6ad}
#app-view.app-shell .contract-workspace-nav button:not(.contract-workspace-new){background:#fff;border-color:#e1e4dd}
#app-view.app-shell .contract-workspace-nav button:not(.contract-workspace-new):hover{background:#fafbf7}
#app-view.app-shell .contract-workspace-nav button:not(.contract-workspace-new).active{background:#eef1e9;border-color:#b8c6ad}
#app-view.app-shell #agenda-view :is(.agenda-toolbar,.operator-agenda-toolbar,.agenda-calendar-card,.operator-agenda-calendar-card,.agenda-list-card,.operator-agenda-list-card){background:#fff}
#app-view.app-shell #agenda-view :is(.agenda-weekdays,.operator-agenda-weekdays){background:#f4f5f0}
#app-view.app-shell #agenda-view :is(.agenda-list-event,.agenda-list-event.needs-outcome){background:#fff}
#app-view.app-shell .document-catalog :is(.dc-toolbar,.dc-category,.dc-group,.dc-dialog){background:#fff;border-color:#e1e4dd}
#app-view.app-shell .document-catalog :is(.dc-bulk,.dc-empty){background:#f5f6f1}
#app-view.app-shell .document-catalog .dc-branches button{background:#fff}
#app-view.app-shell .document-catalog .dc-branches button[aria-pressed=true]{background:#42443f;color:#fffdf3;border-color:#42443f}

/* Shared selection state; functional action buttons retain their own colors. */
#app-view.app-shell{--selection-surface:#e9f5d8;--selection-border:#cfe3b2;--selection-accent:#a0cc43;--selection-text:#173f31}
#app-view.app-shell :is(button,a,[role=tab],[role=option]):is(.active,.is-selected,[aria-selected=true],[aria-pressed=true]):not(.primary):not(.contract-workspace-new):not(.danger-button):not(.danger){
 background:var(--selection-surface);color:var(--selection-text);border-color:var(--selection-border);
 box-shadow:inset 3px 0 0 var(--selection-accent);font-weight:600
}
#app-view.app-shell :is(button,a,[role=tab],[role=option]):is(.active,.is-selected,[aria-selected=true],[aria-pressed=true]):not(.primary):not(.contract-workspace-new):not(.danger-button):not(.danger):hover{
 background:#e3f1cd;color:var(--selection-text);border-color:#bfd5a5;box-shadow:inset 3px 0 0 var(--selection-accent)
}
.dc-location>div{flex:1;min-width:0}
#app-view.app-shell .document-catalog .dc-all-products{flex:none;background:#fff;border:1px solid #dce2d6;color:#45513d;padding:10px 16px;border-radius:10px;font-weight:500;white-space:nowrap}
#app-view.app-shell .document-catalog .dc-all-products:hover{background:#f5f7f0;border-color:#b9c7ab}
@media(max-width:600px){.dc-location{flex-wrap:wrap}.document-catalog .dc-all-products{margin-left:64px}}

/* Document library: light persistent context and horizontal document choices. */
.document-catalog{scroll-margin-top:var(--dc-top,84px)}
.document-catalog .dc-navigation{position:sticky;top:var(--dc-top,84px);z-index:25;isolation:isolate;background:#fff;border:1px solid #e1e4dd;border-radius:12px;padding:10px 14px;box-shadow:0 5px 16px #2538290a;margin-bottom:16px;display:grid;grid-template-columns:minmax(0,1fr) 240px;align-items:center;gap:16px}
.document-catalog .dc-path-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.document-catalog .dc-crumbs{margin:0;padding:0;border:0;gap:7px;min-width:0;font-size:.8rem}
.document-catalog .dc-crumbs button{padding:5px 0}
#app-view.app-shell .document-catalog .dc-all-products{min-height:28px;padding:4px 9px;margin:0;font-size:.73rem}
.document-catalog .dc-controls .dc-toolbar{margin:6px 0;padding:0;border:0;border-radius:0;background:transparent;gap:8px;align-items:center;box-shadow:none}
.document-catalog .dc-toolbar label{margin:0}
.document-catalog .dc-navigation .dc-search{margin:0;min-width:0}
.document-catalog .dc-navigation .dc-search input{margin:0;width:100%;min-height:38px;padding:8px 12px;font-size:.8rem}
.document-catalog .dc-controls{margin:0 0 20px;padding:0 2px 16px;border-bottom:1px solid #e4e7df}
.document-catalog .dc-controls .dc-toolbar{justify-content:flex-end;margin:0 0 12px}
.document-catalog .dc-controls .dc-toolbar>label{margin-right:auto}
.document-catalog .dc-toolbar :is(input,select,button){min-height:38px;font-size:.77rem;padding:8px 10px}
.document-catalog .dc-toolbar select{width:158px}
.document-catalog .dc-scope-row{display:flex;align-items:center;gap:10px;margin-top:6px}
.document-catalog .dc-product-picker{margin:0;flex:none;width:200px}
.document-catalog .dc-product-picker select{min-height:36px;padding:7px 10px;border-radius:8px;font-size:.8rem;font-weight:600}
.document-catalog .dc-scope-row .dc-branches{margin:0;gap:6px;flex-wrap:nowrap;overflow-x:auto;min-width:0;padding:2px 0}
.document-catalog :is(.dc-branches,.dc-kind-tabs) button{min-height:34px;padding:7px 11px;white-space:nowrap;border:1px solid #e1e4dd;border-radius:8px;background:#fff;color:#4c574d;font-size:.77rem;font-weight:500;flex:none}
.document-catalog .dc-kind-tabs{display:flex;gap:6px;overflow-x:auto;margin-top:6px;padding:0 0 2px;scrollbar-width:thin}
#app-view.app-shell .document-catalog :is(.dc-branches,.dc-kind-tabs) button[aria-pressed=true]{background:var(--selection-surface,#e9f5d8);border-color:var(--selection-border,#cfe3b2);color:var(--selection-text,#173f31);box-shadow:inset 0 -2px 0 var(--selection-accent,#a0cc43);font-weight:650}
.document-catalog .dc-status{min-height:0;margin:6px 0 0;font-size:.8rem}
.document-catalog .dc-status:empty{display:none}
.document-catalog .dc-list-head{margin:10px 0;gap:12px}
.document-catalog .dc-list-head h2{margin:0;font-size:1rem;line-height:1.4}
.document-catalog .dc-list-head>span{white-space:nowrap;font-size:.8rem;color:#70796e}
.document-catalog .dc-bulk{padding:8px 12px;margin:10px 0;gap:10px}
.document-catalog .dc-bulk label{display:flex;align-items:center;gap:7px;margin:0;font-size:.75rem}
.document-catalog .dc-bulk :is(input,button){width:auto;min-height:32px;font-size:.75rem}
.document-catalog .dc-bulk input[type=checkbox]{width:16px;height:16px;min-height:16px;padding:0}
.document-catalog .dc-bulk button{padding:6px 10px}
.document-catalog .dc-group{padding:0 14px;margin:12px 0;border-radius:10px}
.document-catalog .dc-group h3{font-size:.82rem;margin:0;padding:11px 0;border-color:#e4e7df}
.document-catalog .dc-document{display:flex;flex-wrap:nowrap;align-items:center;gap:12px;padding:13px 0}
.document-catalog .dc-file{flex:1;min-width:0}
.document-catalog .dc-file strong{font-size:.84rem;line-height:1.5;overflow-wrap:anywhere}
.document-catalog .dc-file small{font-size:.72rem;overflow-wrap:anywhere}
.document-catalog .dc-meta{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px 12px;margin-top:6px;font-size:.71rem}
.document-catalog .dc-actions{display:flex;width:auto;max-width:none;margin:0;flex:none;flex-wrap:nowrap;align-items:center;gap:6px}
.document-catalog .dc-actions :is(button,a,summary){min-height:32px;padding:7px 10px;font-size:.73rem;font-weight:550;border-radius:8px}
.document-catalog .dc-more{position:relative}
.document-catalog .dc-more summary{cursor:pointer;list-style:none;border:1px solid #dfe5d8;white-space:nowrap;background:#fff}
.document-catalog .dc-more summary::-webkit-details-marker{display:none}
.document-catalog .dc-more summary::after{content:'⌄';margin-left:7px}
.document-catalog .dc-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:30;width:190px;display:grid;gap:4px;padding:7px;background:#fff;border:1px solid #dfe5d8;border-radius:10px;box-shadow:0 8px 24px #173f311f}
.document-catalog .dc-menu button{width:100%;text-align:left;border:0}
.document-catalog .dc-menu button:hover{background:#f2f5ed}
.document-catalog .dc-menu [data-dc-delete]{color:#a53131}
.document-catalog .dc-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:10px 0;font-size:.76rem;color:#657161}
.document-catalog .dc-pagination>div{display:flex;align-items:center;gap:10px}
.document-catalog .dc-pagination button{min-height:32px;padding:6px 10px;font-size:.75rem}
.document-catalog .dc-empty{padding:14px;margin:12px 0}
.document-catalog .dc-empty p{margin:0 0 8px;font-size:.8rem}
.document-catalog button:disabled{cursor:default;opacity:.45}
@media(max-width:760px){
 .document-catalog .dc-navigation{padding:10px;grid-template-columns:minmax(0,1fr);gap:8px}
 .document-catalog .dc-path-row{align-items:flex-start}
 .document-catalog .dc-crumbs{font-size:.72rem}
 .document-catalog .dc-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto}
 .document-catalog .dc-toolbar>*{width:auto}
 .document-catalog .dc-toolbar>label{grid-column:1}
 .document-catalog .dc-toolbar>button{font-size:.72rem}
 .document-catalog .dc-scope-row{gap:6px}
 .document-catalog .dc-product-picker{width:150px}
 .document-catalog .dc-document{flex-wrap:wrap;gap:7px}
 .document-catalog .dc-actions{margin-left:30px;width:calc(100% - 30px);justify-content:flex-start}
 .document-catalog .dc-pagination{align-items:flex-start}
}
@media(max-height:620px) and (max-width:760px){
 .document-catalog .dc-navigation{position:static}
}

.document-catalog .dc-document :is(button,a,summary){scroll-margin-top:calc(var(--dc-top,84px) + 90px);scroll-margin-bottom:20px}

/* Personal production; surfaces and selections shared with CRM. */
body{background:var(--crm-workspace,#f5f5f2)}
#app-view .workspace,#app-view .sidebar{background:var(--crm-workspace,#f5f5f2)}
#commercial-home{display:flex;flex-direction:column;gap:24px}
#commercial-home .home-hero-grid{order:-2;display:block;margin:0;background:transparent;padding:0;border:0;box-shadow:none}
#commercial-home .home-copy{padding:0;background:transparent}
#commercial-home .home-copy h1,#commercial-home .home-copy .title-rule,#commercial-home .home-hero{display:none}
#commercial-home .home-copy p{margin:0;color:#617168;font-size:1rem}
.agent-production{order:-1}.production-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.production-head h1{font-size:2rem;margin:6px 0;color:var(--selection-text,#173f31)}.production-head p{margin:5px 0;color:#617168}.production-head label{min-width:220px;display:grid;gap:8px}.production-head select{width:100%;background:#fff}.production-notice{font-size:.85rem;color:#617168;min-height:22px}
.production-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}.production-stats button{display:flex;flex-direction:column;align-items:start;gap:14px;padding:22px;border:1px solid var(--crm-border,#e1e4dd);border-radius:18px;background:var(--crm-surface,#fff);color:var(--selection-text,#173f31)}.production-stats button span{font-weight:500}.production-stats strong{font-size:2rem}
.production-charts{display:grid;grid-template-columns:1fr 1fr;gap:22px}.production-panel{background:var(--crm-surface,#fff);border:1px solid var(--crm-border,#e1e4dd);border-radius:22px;padding:26px;min-width:0}.production-panel h2{font-size:1.22rem;margin:0 0 12px}.production-panel>p{color:#617168;margin:0 0 20px;font-size:.85rem}.production-months{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end}.production-months button{display:grid;justify-items:center;gap:12px;min-width:0;border:0;border-radius:12px;background:transparent;padding:8px 4px;color:var(--selection-text,#173f31)}.production-months svg{display:block;width:100%;max-width:68px;height:170px}.production-track{fill:#f0f0eb}.production-bar{fill:#b1dc00}.production-months span{font-weight:400;text-transform:capitalize;color:#617168}.production-products{display:grid;gap:14px}.production-products button{display:grid;grid-template-columns:1fr auto;gap:8px;background:transparent;border:0;padding:8px 0;color:var(--selection-text,#173f31);text-align:left}.production-products progress{grid-column:1/-1;width:100%;height:10px;border:0;border-radius:8px;overflow:hidden;appearance:none}.production-products progress::-webkit-progress-bar{background:#e8ede7}.production-products progress::-webkit-progress-value{background:linear-gradient(90deg,#0aa66a,#c5e800);border-radius:8px}.production-products progress::-moz-progress-bar{background:#7cbd3c}
.production-recent{margin-top:22px}.production-list-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.production-recent-row{display:flex;align-items:center;justify-content:space-between;width:100%;gap:20px;text-align:left;padding:16px 0;background:var(--crm-surface,#fff);color:var(--selection-text,#173f31);border:0;border-bottom:1px solid var(--crm-border,#e1e4dd)}.production-recent-row small{display:block;margin-top:7px;color:#617168}.production-recent-row:last-child{border-bottom:0}
#app-view .home-work{margin:0;padding:0;background:transparent;box-shadow:none;border:0}#app-view .home-work-card,#app-view .home-work-card.attention{background:var(--crm-surface,#fff);border:1px solid var(--crm-border,#e1e4dd);border-top:1px solid var(--crm-border,#e1e4dd);box-shadow:none;color:var(--selection-text,#173f31)}#app-view .home-work-card:before{display:none}#home-work-title{font-size:1.35rem}#home-work-actions{margin-top:16px}#home-drafts{display:none}
#commercial-home .operator-dashboard{background:transparent;padding:0;margin:0;border:0;box-shadow:none}#commercial-home[data-personal=true] .operator-dashboard>.dashboard-section-head,#commercial-home[data-personal=true] #operator-dashboard-stats{display:none}#commercial-home .operator-dashboard-actions{display:flex;flex-wrap:wrap;gap:12px;margin:0}#commercial-home .dashboard-action{background:var(--crm-surface,#fff);border:1px solid var(--crm-border,#e1e4dd);box-shadow:none;min-height:48px;padding:14px 20px}#commercial-home .dashboard-action[data-contract-agent-section=send]{display:none}
#app-view .contract-product-tag{display:inline-flex;align-items:center;gap:7px;padding:6px 11px;background:var(--selection-surface,#e9f5d8);color:var(--selection-text,#173f31);border:1px solid var(--selection-border,#cfe3b2);border-radius:9px;font-size:.82rem;font-weight:600;margin:0 0 16px}#app-view .contract-product-tag svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#app-view :is(input,select,textarea){background:var(--crm-surface,#fff);border-color:#dfe3da;color:var(--selection-text,#173f31)}#app-view :is(input,select,textarea):focus{outline:2px solid #a8bd98;outline-offset:2px}#app-view input[type=checkbox]{accent-color:#2c714b}#app-view :is(.filters,.contract-agent-filters,.library-filters,.contract-agent-toolbar,.contract-card,.home-card){background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd)}#app-view :is(.secondary,.quiet){background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd);color:var(--selection-text,#173f31)}#app-view :is(.secondary,.quiet):hover{background:#fafbf7}
@media(max-width:800px){.production-charts{grid-template-columns:1fr}.production-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.production-head{align-items:start;flex-direction:column}.production-head label{width:100%}.production-panel{padding:20px}.production-list-head{align-items:start;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.agent-production *{scroll-behavior:auto;transition:none}}
/* Override legacy colored cards, including their more-specific active rules. */
#app-view.app-shell #home-work-actions .home-work-card:nth-child(n){background:var(--crm-surface,#fff);border:1px solid var(--crm-border,#e1e4dd);box-shadow:none}
#app-view.app-shell #commercial-home .dashboard-action:nth-child(n){background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd)}
#app-view.app-shell #contratti-view:not(.manager-mode) .contract-section-card{background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd);box-shadow:none;outline:0}
#app-view.app-shell #contratti-view:not(.manager-mode) .contract-section-card :is(strong,small){color:var(--selection-text,#173f31)}
#app-view.app-shell #contratti-view:not(.manager-mode) .contract-section-card .contract-section-icon{background:#f0f3e9;color:#577650}
#app-view.app-shell #contratti-view:not(.manager-mode) .contract-section-card.active{background:var(--selection-surface,#e9f5d8);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell :is(.contract-form,.contract-history,.quote-list,.profile-card,.profile-form,.invoice-card,.archive-tools){background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd)}
#home-view{display:flex;flex-direction:column;gap:24px}#home-view>.gteck-assistant-strip{order:2;background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd)}
#app-view.app-shell :is(.secondary,.quiet){background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd);color:var(--selection-text,#173f31)}
#app-view.app-shell :is(.secondary,.quiet):hover{background:#fafbf7}
#app-view.app-shell .nav-item.active:hover{background:#e3f1cd;border-color:#bfd5a5}
#app-view.app-shell #agenda-view .operator-agenda-list-item{background:#fff}
#app-view.app-shell #agenda-view .operator-agenda-list-heading{background:#fff}
#app-view.app-shell #agenda-view .operator-agenda-day{background:#fff}
#app-view.app-shell #agenda-view .operator-agenda-day.selected{background:var(--selection-surface,#e9f5d8);box-shadow:inset 0 0 0 2px var(--selection-accent,#a0cc43)}

/* Consistent CRM interaction colors across every portal view. */
#app-view.app-shell :is(button,a,input,select,textarea):focus-visible{outline:2px solid #a8bd98;outline-offset:3px}
#app-view.app-shell :is(select.is-filtered,[aria-current=page].nav-item){background:var(--selection-surface,#e9f5d8);color:var(--selection-text,#173f31);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell :is(.quiet,.secondary):hover{border-color:#bfd5a5;box-shadow:none;transform:none}
#app-view.app-shell :is(button,a)[aria-pressed=true]:not(.primary){background:var(--selection-surface,#e9f5d8);color:var(--selection-text,#173f31);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell #editor-view[data-sector]{--sector-accent:var(--crm-primary,#285c43);--sector-soft:#f0f3e9;--sector-shadow:rgba(34,49,38,.04)}
#app-view.app-shell #editor-view[data-sector] :is(.quote-editor-main,.quote-live-preview){background:var(--crm-surface,#fff);border-top-width:3px;border-top-color:var(--crm-primary,#285c43);box-shadow:0 8px 24px rgba(34,49,38,.04)}
#app-view.app-shell #editor-view[data-sector] :is(.quote-panel-title,.form-section-title,.catalog-heading h3){color:var(--crm-primary,#285c43)}
#app-view.app-shell #editor-view[data-sector] .quote-sector-tabs button{background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd);color:var(--selection-text,#173f31);box-shadow:none;outline:0}
#app-view.app-shell #editor-view[data-sector] .quote-sector-tabs button.active{background:var(--selection-surface,#e9f5d8);border-color:var(--selection-border,#cfe3b2);color:var(--selection-text,#173f31);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell #editor-view[data-sector] .quote-sector-tabs button:focus-visible{outline:2px solid #a8bd98;outline-offset:2px}
#app-view.app-shell .commercial-channel-option{background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd)}
#app-view.app-shell .commercial-channel-option:has(input:checked){background:var(--selection-surface,#e9f5d8);color:var(--selection-text,#173f31);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell .commercial-channel-option input{accent-color:var(--crm-primary,#285c43)}
#app-view.app-shell :is(.catalog-item-card,.quote-card).selected{background:var(--selection-surface,#e9f5d8);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}

/* Archive: explicit selection and separate, labelled actions. */
#app-view.app-shell #archivio-view .archive-head{padding:22px 28px;position:sticky;top:0;z-index:8;align-items:center;gap:16px}
#app-view.app-shell #archivio-view .archive-head h1{font-size:1.65rem;margin:0}
#app-view.app-shell #archivio-view .archive-head .eyebrow{margin:0 0 6px}
#app-view.app-shell #archivio-view .archive-tools{padding:20px 24px;margin:20px 28px;border-radius:16px;box-shadow:none}
#app-view.app-shell #archivio-view .archive-list{margin:16px 28px 32px;padding:0;border:0;background:transparent;box-shadow:none}
#app-view.app-shell #archivio-view .archive-summary{margin:16px 28px;color:#617168}
#app-view.app-shell #archivio-view .archive-card{grid-template-columns:minmax(240px,1fr) auto auto;gap:18px;padding:22px;background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd);box-shadow:none;position:relative}
#app-view.app-shell #archivio-view .archive-card.selected{background:#f5f9ed;border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell #archivio-view .archive-identity{grid-column:1;gap:10px}
#app-view.app-shell #archivio-view .archive-select{display:flex;align-items:center;gap:10px;min-height:36px;max-width:100%;text-align:left;padding:0;background:transparent;border:0;box-shadow:none;color:var(--selection-text,#173f31);cursor:pointer}
#app-view.app-shell #archivio-view .archive-select:hover strong{text-decoration:underline;text-underline-offset:4px}
#app-view.app-shell #archivio-view .archive-select[aria-pressed=true]{background:transparent;box-shadow:none}
#app-view.app-shell #archivio-view .archive-select-mark{display:grid;place-items:center;flex:none;width:20px;height:20px;border:1px solid #bccbb0;border-radius:5px;background:var(--crm-surface,#fff);color:var(--crm-primary,#285c43)}
#app-view.app-shell #archivio-view .archive-select[aria-pressed=true] .archive-select-mark{background:var(--selection-surface,#e9f5d8);border-color:var(--selection-accent,#a0cc43)}
#app-view.app-shell #archivio-view .archive-selected-label{font-size:.74rem;font-weight:500;color:#617168;margin-left:auto;padding-left:12px;white-space:nowrap}
#app-view.app-shell #archivio-view .archive-identity>span{font-size:.85rem;font-weight:400;color:#617168}
#app-view.app-shell #archivio-view .archive-identity small{flex-wrap:wrap}
#app-view.app-shell #archivio-view .archive-status{grid-column:3;grid-row:1;min-height:0;padding:7px 12px;background:#f0f3ed;border:0;border-radius:8px;font-size:.8rem;justify-self:end}
#app-view.app-shell #archivio-view .archive-price{grid-column:2;grid-row:1}
#app-view.app-shell #archivio-view .archive-actions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;padding-top:14px;border-top:1px solid #e9ece5}
#app-view.app-shell #archivio-view .archive-actions [data-archive-open]{background:#078b76;border-color:#078b76;color:#fff}
#app-view.app-shell #archivio-view .archive-actions [data-archive-open]:hover{background:#087761;border-color:#087761}
#app-view.app-shell #archivio-view .archive-actions button{font-size:.83rem;min-height:42px;padding:10px 14px}
#app-view.app-shell #archivio-view .archive-card .chip{font-size:.7rem;font-weight:500;background:#f0f3ed}

@media(max-width:900px){#app-view.app-shell #archivio-view .archive-card{grid-template-columns:minmax(0,1fr) auto}#app-view.app-shell #archivio-view .archive-identity{grid-column:1/-1}#app-view.app-shell #archivio-view .archive-price{grid-column:1;grid-row:2}#app-view.app-shell #archivio-view .archive-status{grid-column:2;grid-row:2}#app-view.app-shell #archivio-view .archive-head{padding:18px;flex-wrap:wrap}#app-view.app-shell #archivio-view :is(.archive-tools,.archive-summary,.archive-list){margin-left:16px;margin-right:16px}}
@media(max-width:600px){#app-view.app-shell #archivio-view .archive-card{padding:16px;display:grid;gap:12px}#app-view.app-shell #archivio-view .archive-actions{justify-content:start}#app-view.app-shell #archivio-view .archive-actions button{flex:1;min-width:115px}#app-view.app-shell #archivio-view .archive-head h1{font-size:1.3rem}#app-view.app-shell #archivio-view .archive-selected-label{font-size:.7rem}}
#app-view.app-shell #archivio-view .archive-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 0;color:#617168;font-size:.85rem}
#app-view.app-shell #archivio-view .archive-summary{scroll-margin-top:120px}
@media(max-width:600px){#app-view.app-shell #archivio-view .archive-pagination{flex-wrap:wrap;justify-content:center}}
#app-view.app-shell .catalog-channel-options label{background:var(--crm-surface,#fff);border-color:var(--crm-border,#e1e4dd);color:var(--selection-text,#173f31);box-shadow:none}
#app-view.app-shell .catalog-channel-options label:has(input:checked){background:var(--selection-surface,#e9f5d8);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell .catalog-channel-options input{accent-color:var(--crm-primary,#285c43)}
#app-view.app-shell .catalog-item.active{background:var(--selection-surface,#e9f5d8);border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
/* Explicit rows prevent older archive grid rules from moving actions above names. */
#app-view.app-shell #archivio-view .archive-identity{grid-row:1}
#app-view.app-shell #archivio-view .archive-actions{grid-row:2}
@media(max-width:900px){#app-view.app-shell #archivio-view .archive-actions{grid-row:3}}
@media(max-width:600px){
 #app-view.app-shell #archivio-view .archive-head{display:grid;grid-template-columns:1fr;gap:12px;padding:16px}
 #app-view.app-shell #archivio-view .archive-head-actions{display:flex;gap:8px;flex-wrap:nowrap;width:100%}
 #app-view.app-shell #archivio-view .archive-head-actions button{flex:1;min-height:40px;padding:8px;font-size:.76rem}
 #app-view.app-shell #archivio-view .archive-tools{display:grid;grid-template-columns:1fr 1fr;gap:16px 10px;padding:18px;margin-top:16px}
 #app-view.app-shell #archivio-view .archive-tools label{margin:0;min-width:0;gap:7px}
 #app-view.app-shell #archivio-view .archive-tools .archive-search{grid-column:1/-1;min-width:0}
 #app-view.app-shell #archivio-view .archive-tools :is(select,input){width:100%;min-width:0;min-height:44px;padding:10px;font-size:.85rem}
 #app-view.app-shell #archivio-view #archive-reset{grid-column:1/-1;justify-self:end;padding:6px 10px;min-height:36px;font-size:.8rem}
}

/* Interactive cards echo the existing search field on pointer hover. */
@media(hover:hover) and (pointer:fine){
 #app-view.app-shell :is(.admin-control-grid,.bo-priority-grid,.production-stats,.production-months,.production-products) button:not(:disabled):hover,
 #app-view.app-shell .contract-queue-tabs button:not(:disabled):hover,
 #app-view.app-shell :is(.hvac-library .library-index a,.home-work-card,.dashboard-action,.contract-section-card,.dc-category):hover{
  background:#fff!important;
  border-color:#9bdc55;
  box-shadow:inset 0 0 0 1px #9bdc55,0 0 0 4px rgba(168,232,47,.12);
  transform:none;
 }
}
#app-view.app-shell :is(.admin-control-grid,.bo-priority-grid,.production-stats,.production-months,.production-products) button:focus-visible,
#app-view.app-shell .contract-queue-tabs button:focus-visible,
#app-view.app-shell :is(.hvac-library .library-index a,.home-work-card,.dashboard-action,.contract-section-card,.dc-category):focus-visible{
 outline:2px solid #9bdc55;outline-offset:2px;
 box-shadow:0 0 0 4px rgba(168,232,47,.12);
}

