/* Navigation and visual hierarchy using the approved light palette.
   No geometry, business state, text or print changes. */
@media screen {
 :where(#app) { --area-ink:#923b20; --area-tint:#fff0e8; --area-edge:#d9a18a; }
 [data-color-area="register"], [data-color-area="economy"] { --area-ink:#365f50; --area-tint:#eaf3ee; --area-edge:#88aa9b; }
 [data-color-area="lpr-hub"] { --area-ink:#375a7c; --area-tint:#eaf0f8; --area-edge:#91aac7; }
 [data-color-area="pipeline"] { --area-ink:#923b20; --area-tint:#fff0e8; --area-edge:#d9a18a; }
 [data-color-area="pricebooks"], [data-color-area="purchasing"] { --area-ink:#725127; --area-tint:#f8f3ea; --area-edge:#b8a17e; }
 [data-color-area="tools"], [data-color-area="rentals"], [data-color-area="people"], [data-color-area="company-analysis"] { --area-ink:#63507f; --area-tint:#f1edf8; --area-edge:#ad9cc4; }

 #app.horizontal-menu .sidebar { background:linear-gradient(105deg,#fff 20%,var(--area-tint)); border-bottom-color:var(--area-edge); }
 #app.horizontal-menu #nav .nav-item { box-shadow:inset 0 -2px var(--area-tint); }
 #app.horizontal-menu #nav .nav-item .tl-category-icon { color:var(--area-ink); }
 #app.horizontal-menu #nav .nav-item.active,
 #app.horizontal-menu #nav .nav-item.active:hover {
  color:var(--area-ink); background:var(--area-tint); font-weight:750;
  box-shadow:inset 0 -3px var(--area-ink);
 }
 #app.horizontal-menu #nav .active .tl-category-icon,
 #app.horizontal-menu #nav .active .tl-category-icon .accent { color:var(--area-ink); stroke:var(--area-ink); }
 #app.horizontal-menu #nav .nav-item:hover { background:var(--area-tint); color:var(--area-ink); }
 #app.horizontal-menu #nav .nav-item:focus-visible { outline:2px solid #375a7c; outline-offset:-2px; }
 #app #sectionNavigation { background:linear-gradient(90deg,var(--area-tint),#fff 75%); border-bottom-color:var(--area-edge); }
 #app #sectionNavigation [aria-current="page"] { background:var(--area-tint); color:var(--area-ink); border-color:var(--area-ink); box-shadow:inset 0 -2px var(--area-ink); }

 /* Same destination, same family in the Home shortcuts. */
 .tl-home .th-launch:nth-of-type(1) { --launch-ink:#365f50; --launch-tint:#eaf3ee; --launch-edge:#88aa9b; }
 .tl-home .th-launch:nth-of-type(2) { --launch-ink:#375a7c; --launch-tint:#eaf0f8; --launch-edge:#91aac7; }
 .tl-home .th-launch:nth-of-type(3) { --launch-ink:#923b20; --launch-tint:#fff0e8; --launch-edge:#d9a18a; }
 .tl-home .th-launch:nth-of-type(n) { background:linear-gradient(110deg,var(--launch-tint),#fff); color:var(--launch-ink); border-color:var(--launch-edge); box-shadow:inset 4px 0 var(--launch-edge),0 3px 6px #253d3010; }
 .tl-home .th-launch:nth-of-type(n)>span:not(.tl-category-icon) { color:#52616a; }
 .tl-home .th-launch:nth-of-type(n)>.tl-category-icon { background:var(--launch-tint); color:var(--launch-ink); }
 .tl-home .th-launch:nth-of-type(n) .accent { stroke:var(--launch-ink); }
 .tl-home .th-launch:nth-of-type(n)>i { color:var(--launch-ink); }
 .tl-home .th-launch:nth-of-type(n):hover { background:var(--launch-tint); box-shadow:inset 4px 0 var(--launch-ink),0 5px 14px #253d3018; }
 .tl-home .th-world:not(.th-world-lpr) { background:linear-gradient(135deg,#fffaf6,#fff); border-color:#ead3c5; }
 .tl-home .th-pricebooks>div:first-child { background:linear-gradient(120deg,#f8f3ea,#fffdf9); }
 .tl-home .th-review-entry { background:linear-gradient(100deg,#f1edf8,#fff); border-color:#d9d0e6; }
 .tl-home .th-world .th-link:hover { background:#ffffffb3; }
 .tl-home .th-link:focus-visible,.tl-home .th-launch:focus-visible { outline:3px solid #375a7c; outline-offset:2px; }

 /* Existing directory cards retain their labels, order and size. */
 #app .navigation-card { background:linear-gradient(120deg,var(--area-tint),#fff 70%); border-color:var(--area-edge); box-shadow:inset 4px 0 var(--area-edge); }
 #app .navigation-card strong,#app .navigation-card small { color:var(--area-ink); }
 #app .navigation-card:hover { background:var(--area-tint); border-color:var(--area-ink); box-shadow:inset 4px 0 var(--area-ink); }
 #app .navigation-card:focus-visible { outline:3px solid #375a7c; outline-offset:2px; }

 /* Existing CRM form: header cues, selection and focus only. No status recoloring. */
 #commercialWorkspace .cw-modes>button[aria-pressed="true"] { background:#fff0e8; color:#923b20; border-color:#d9a18a; box-shadow:inset 0 -2px #923b20; }
 #commercialWorkspace .qo-compose-section { background:linear-gradient(180deg,#fff7f0 0,#fff 90px); border-color:#e5cdbd; }
 #commercialWorkspace .qo-compose-section>h3 { color:#923b20; }
 #commercialWorkspace .qo-compose-section:focus-within { border-color:#ad6849; box-shadow:0 0 0 1px #ad6849; }
 #commercialWorkspace .qo-live-preview { background:linear-gradient(150deg,#f5f7fa,#fff 36%); border-color:#c4d1df; }
 #commercialWorkspace .qo-live-preview>h3 { color:#375a7c; }
 #commercialWorkspace .qo-address-row:has(input:checked),
 #commercialWorkspace .qo-list-choice:has(input:checked) { background:#fff0e8; box-shadow:inset 3px 0 #923b20; }
 #commercialWorkspace .qo-target { background:#fff0e8; border-color:#d9a18a; box-shadow:inset 3px 0 #923b20; }
 #commercialWorkspace .qo-address-row:hover:not(:has(input:checked)),#commercialWorkspace .qo-list-choice:hover:not(:has(input:checked)) { background:#fff7f0; }
 #commercialWorkspace .qo :is(input,textarea,select):focus-visible { outline:2px solid #375a7c; outline-offset:2px; }
 #commercialWorkspace .qo button:focus-visible,#commercialWorkspace .qo summary:focus-visible { outline:3px solid #375a7c; outline-offset:2px; }
 /* Category contents keep the same visual identity as their menu entry. */
 body[data-work-area] { --area-ink:#365f50; --area-tint:#eaf3ee; --area-edge:#88aa9b; }
 body[data-work-area="lpr-work"] { --area-ink:#375a7c; --area-tint:#eaf0f8; --area-edge:#91aac7; }
 body[data-work-area="purchases-work"] { --area-ink:#725127; --area-tint:#f8f3ea; --area-edge:#b8a17e; }
 body[data-work-area="customer-offers-work"] { --area-ink:#923b20; --area-tint:#fff0e8; --area-edge:#d9a18a; }
 body[data-work-area="serials-work"] { --area-ink:#63507f; --area-tint:#f1edf8; --area-edge:#ad9cc4; }
 body[data-work-area] .register-hero h1,
 body[data-work-area] #content .area-heading h3 { color:var(--area-ink); }
 body[data-work-area] #content .customer-filter { background:linear-gradient(110deg,var(--area-tint),#fff 85%); border-color:var(--area-edge); }
 body[data-work-area] .navigation-scope { background:var(--area-tint); }
 body[data-work-area] .navigation-scope [aria-pressed="true"],
 body[data-work-area] nav[aria-label="Navigazione principale"]>button.active { background:var(--area-ink); border-color:var(--area-ink); color:#fff; }
 body[data-work-area] #content .register-line>.line-customer { background:var(--area-tint); border-color:var(--area-edge); }
 body[data-work-area] #content .line-customer>.customer-name { color:var(--area-ink); }
 body[data-work-area] #content .line-customer>.customer-name:hover { background:var(--area-tint); text-decoration:underline; }
 body[data-work-area="lpr-work"] #content .register-line { box-shadow:inset 3px 0 var(--area-edge); }
 body[data-work-area] #content .register-line:focus-within { outline:2px solid var(--area-ink); outline-offset:1px; }
 body[data-work-area] #form>.heading { background:linear-gradient(100deg,var(--area-tint),#fff); }
 body[data-work-area] #formTitle { color:var(--area-ink); }
 body[data-work-area] :is(input,select,textarea):focus-visible { outline:2px solid var(--area-ink); outline-offset:2px; }
 body[data-work-area] #content th { background:var(--area-tint); color:var(--area-ink); }
 /* Prices and reference contents: readable columns, distinct active filters. */
 .tl-pricebook .selection { background:linear-gradient(110deg,#f8f3ea,#fff); border-color:#b8a17e; }
 .tl-pricebook :is(h1,h2),.tl-pricebook td.price { color:#725127; }
 .tl-pricebook th { background:#f8f3ea; color:#725127; }
 .tl-pricebook button[aria-pressed="true"] { background:#725127; border-color:#725127; color:#fff; }
 .tl-pricebook tbody tr:hover,.tl-pricebook tbody tr:focus-within { background:#f8f3ea; }
 .tl-pricebook :is(input,select,button):focus-visible { outline:2px solid #725127; outline-offset:2px; }
 #app[data-color-area="pricebooks"] .pricebook-card { background:linear-gradient(120deg,#f8f3ea,#fff); border-color:#b8a17e; }
 #app[data-color-area="pricebooks"] .pricebook-card :is(strong,b) { color:#725127; }
 #app[data-color-area="tools"] #content :is(.card-header,thead th) { background:#f1edf8; color:#63507f; }
}
@media (forced-colors:active) {
 #app.horizontal-menu #nav .nav-item.active { outline:2px solid Highlight; outline-offset:-2px; }
 #commercialWorkspace .qo-list-choice:has(input:checked),#commercialWorkspace .qo-address-row:has(input:checked) { outline:1px solid Highlight; }
}
