/* Critical paint — palette Codewaru immediata, senza attendere JS */

:root {
    --cw-primary: #E55B00;
    --cw-primary-dark: #C44E00;
    --cw-header-bg: #121212;
    --cw-sidebar-bg: #181817;
    --cw-surface: #FCFBF8;
    --cw-text: #414141;
    --cw-logo: url("/__brand/logo.webp");
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: var(--cw-text) !important;
    -webkit-font-smoothing: antialiased;
}

.tronlogo .br-logo,
.troncloud .br-logo,
.tronshop .br-logo,
.trondesigner .br-logo,
.br-logo {
    background: var(--cw-header-bg) !important;
    background-color: var(--cw-header-bg) !important;
}

.tronlogo .br-logo::before,
.troncloud .br-logo::before,
.tronshop .br-logo::before,
.trondesigner .br-logo::before,
.br-logo::before {
    content: "" !important;
    display: block !important;
    background: none !important;
    background-image: var(--cw-logo) !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: auto 42px !important;
}

.br-header,
.br-header-left,
.br-header-right,
.br-header-user,
.br-sideleft,
.navicon-left,
#placeholder,
.pg-loading-screen {
    background-color: var(--cw-header-bg) !important;
}

.tronlogo.service-banner,
.troncloud.service-banner,
.tronshop.service-banner,
.trondesigner.service-banner,
[style*="background:linear-gradient(90deg,#6080de"],
[style*="background:linear-gradient(90deg, #6080de"] {
    background: linear-gradient(135deg, var(--cw-primary) 0%, var(--cw-primary-dark) 100%) !important;
}

.tronlogo .button-basic,
.tronlogo .basic-themed-button,
.tronlogo .btn-group__item--active,
.tronlogo .themed-icon-button,
.tronlogo button.dx-grid-add-button-variant,
.troncloud .button-basic,
.troncloud .basic-themed-button,
.troncloud .btn-group__item--active,
.tronshop .button-basic,
.tronshop .basic-themed-button,
.tronshop .btn-group__item--active,
.trondesigner .button-basic,
.trondesigner .basic-themed-button,
.trondesigner .btn-group__item--active,
.btn-primary,
.btn-success,
.bg-primary {
    background-color: var(--cw-primary) !important;
    border-color: var(--cw-primary) !important;
}

/* Testo scuro immediato su sidebar/card chiare */
.left-side-menu .menu-item-label,
.left-side-menu .root-child-item,
.info-box,
.info-box p,
.info-box span,
.info-box div,
.info-box li,
.info-box label,
.info-box .label,
.page-block,
.page-block p,
.page-block span,
.page-block div,
.page-block li,
.page-block label {
    color: #414141 !important;
}

/* Back navigator: testo bianco su sfondo scuro */
.left-side-menu .root-menu-wrapper.back-navigator {
    background-color: #121212 !important;
}
.left-side-menu .root-menu-wrapper.back-navigator .root-child-link .root-child-item,
.left-side-menu .root-menu-wrapper.back-navigator .root-child-link .root-child-item span,
.left-side-menu .root-menu-wrapper.back-navigator .root-child-link .root-child-item .menu-item-label {
    color: #fff !important;
}

.tronlogo .link.active,
.tronlogo .themed-icon,
.troncloud .themed-link,
.troncloud .link.active,
.tronshop .themed-link,
.tronshop .link.active,
.trondesigner .themed-link,
.trondesigner .link.active,
.br-sideleft .br-menu-link.active .br-menu-item,
.br-sideleft .br-menu-sub .nav-link.active,
.text-primary,
.link-primary,
.themed-link,
.primary-link,
.dx-link {
    color: var(--cw-primary) !important;
}

[style*="background-color:#9819b0"],
[style*="background-color:#4269d8"],
[style*="background-color:#09c787"],
[style*="background-color:#f03565"],
[style*="background-color:#47c3f7"],
[style*="background-color:#1beeee"],
[style*="background-color:rgb(66,105,216)"],
[style*="background-color:rgb(152,25,176)"],
[style*="background-color:rgb(9,199,135)"],
[style*="background-image:linear-gradient(to top, #9819b0"],
[style*="background-image:linear-gradient(to top, #4269d8"],
[style*="background-image:linear-gradient(to top, #09c787"],
[style*="background-image:linear-gradient(to top, #17a2b8"],
[style*="background-image: linear-gradient(to top, #9819b0"],
[style*="background-image: linear-gradient(to top, #4269d8"],
[style*="background-image: linear-gradient(to top, #09c787"] {
    background: linear-gradient(135deg, var(--cw-primary) 0%, var(--cw-primary-dark) 100%) !important;
    background-image: linear-gradient(to top, var(--cw-primary), rgba(229, 91, 0, 0.55)) !important;
    background-color: var(--cw-primary) !important;
}

/* Tile servizi — paint immediato */
.bg .element-container > * > div > div:first-child {
    background-image: linear-gradient(to top, var(--cw-primary), rgba(229, 91, 0, 0.55)) !important;
    background-color: var(--cw-primary) !important;
    border-radius: 12px !important;
}
.bg .element-container:nth-child(5n+2) > * > div > div:first-child {
    background-image: linear-gradient(to top, var(--cw-primary-dark), rgba(196, 78, 0, 0.55)) !important;
    background-color: var(--cw-primary-dark) !important;
}
.bg .element-container:nth-child(5n+3) > * > div > div:first-child {
    background-image: linear-gradient(to top, #FF8C3A, rgba(255, 140, 58, 0.55)) !important;
    background-color: #FF8C3A !important;
}
.bg .element-container:nth-child(5n+4) > * > div > div:first-child {
    background-image: linear-gradient(to top, var(--cw-header-bg), rgba(42, 42, 42, 0.55)) !important;
    background-color: var(--cw-header-bg) !important;
}
.bg .element-container:nth-child(5n) > * > div > div:first-child {
    background-image: linear-gradient(to top, var(--cw-primary-soft), rgba(229, 91, 0, 0.45)) !important;
    background-color: var(--cw-primary-soft) !important;
}
