/* OrchestrHouse: pearl grey surfaces, white gradients and graphite controls.
   This final presentation layer also covers the retained workspace and login. */
:root {
    color-scheme: light;
    --tp-bg-deep: #e7e9ec;
    --tp-bg: #f0f1f3;
    --tp-nav: #eef0f2;
    --tp-nav-2: #ffffff;
    --tp-purple: #4b5563;
    --tp-purple-2: #626c78;
    --tp-pink: #737c87;
    --tp-cyan: #9099a3;
    --tp-ink: #2d333b;
    --tp-muted: #5e6874;
    --tp-line: #dce0e5;
    --tp-surface: #f6f7f8;
    --tp-card: #ffffff;
    --tp-shadow: 0 16px 42px rgba(35, 42, 52, .08);
    --tp-shadow-soft: 0 8px 24px rgba(35, 42, 52, .05);
}

body,
body.tp-login {
    color: var(--tp-ink);
    background:
        radial-gradient(ellipse at 85% 8%, #ffffff 0, transparent 55%),
        linear-gradient(135deg, #e7e9ec 0%, #f2f3f5 48%, #ffffff 100%) !important;
}

*:focus-visible {
    outline-color: #4b5563;
}

* { scrollbar-color: #a4abb4 transparent; }
@supports selector(::-webkit-scrollbar) {
    *::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #c4c9d0, #919aa5);
        background-clip: padding-box;
    }
    *::-webkit-scrollbar-thumb:hover,
    *::-webkit-scrollbar-thumb:active {
        background: #7c8794;
        background-clip: padding-box;
    }
}

a { color: #4b5563; }
a:hover, a:focus { color: #252c35; }

.tp-sidebar.navSpecial {
    color: #505965;
    background: linear-gradient(150deg, #f8f9fa 0%, #eceef1 55%, #ffffff 100%);
    border-color: #d1d6dc;
    box-shadow: -6px 0 22px rgba(35, 42, 52, .04), inset 0 0 0 1px #ffffff;
}

.tp-sidebar-brand { border-bottom-color: #dce0e5; }
.tp-brand-logo,
.tp-sidebar-brand-logo-full,
.tp-login-card-logo { filter: grayscale(1); }
.tp-sidebar-brand-logo-mark { filter: brightness(0); opacity: .77; }

.tp-sidebar .menuCentrale li a { color: #4b5563 !important; }
.tp-sidebar .menuCentrale li a:hover {
    color: #2d333b !important;
    background: #ffffff !important;
    box-shadow: inset 0 0 0 1px #d5dae0;
}
.tp-sidebar .menuCentrale li.active a {
    color: #252c35 !important;
    background: linear-gradient(110deg, #dce0e5, #f9fafb) !important;
    box-shadow: inset 3px 0 0 #68727f, inset 0 0 0 1px #c8ced6, 0 4px 12px rgba(35, 42, 52, .04);
    font-weight: 650 !important;
}
.tp-sidebar .menuCentrale li img { filter: grayscale(1); }
.tp-sidebar-foot {
    color: #5e6874;
    background: linear-gradient(135deg, #ffffff, #f0f2f4);
    border-color: #d5dae0;
}
.tp-sidebar-foot strong { color: #2d333b; }

.tp-workspace {
    background: #ffffff;
    border-color: #dce0e5;
}
.tp-workspace .tp-topbar {
    background: linear-gradient(180deg, #ffffff, #f7f8f9);
    border-bottom-color: #e1e4e8;
}
.tp-workspace .tp-page-context,
.tp-workspace .tp-topbar .userLogin li:first-child span { color: #5b6470 !important; }
.tp-workspace .tp-topbar #logoutForm { border-color: #dce0e5; }
.tp-workspace .tp-topbar .userLogin a,
.tp-workspace .tp-topbar .userLogin button {
    color: #454e5b !important;
    border-color: #d5dae0 !important;
    box-shadow: 0 3px 10px rgba(35, 42, 52, .03);
}
.tp-workspace .tp-topbar .userLogin a:hover,
.tp-workspace .tp-topbar .userLogin button:hover {
    color: #252c35 !important;
    background: #f0f2f4 !important;
    border-color: #afb7c1 !important;
}
.body-content.tp-main {
    background: linear-gradient(165deg, #f3f4f6 0%, #fafbfc 36%, #ffffff 75%);
}

.topPanel,
.topPanel.bgGreen,
.topPanel.bgRed,
.topPanel.bgBlue1,
.topPanel.bgGold1,
.container-home,
.tp-main > .text-center:first-child {
    background: linear-gradient(180deg, #ffffff, #f7f8f9) !important;
}
.elem-list { color: #4b5563; background: #f7f8f9; border-color: #e1e4e8; }
.elem-list::before { box-shadow: 0 0 0 4px rgba(75, 85, 99, .08); }
.elem-list a { color: #454e5b; }
.table { box-shadow: 0 5px 16px rgba(35, 42, 52, .04); }
thead,
.tableHeader,
.table > thead > tr > th { background: #f0f2f4 !important; }
thead tr th,
thead tr th a,
.table > thead > tr > th,
.table > thead > tr > th > a { color: #5b6470 !important; }
.table > thead > tr > th,
.table > tbody > tr > td,
.table > tbody > tr > th { border-color: #e5e8ec !important; }
.table > tbody > tr:hover { background: #f6f7f8 !important; }

.form-control,
select.form-control,
input.form-control,
textarea.form-control { border-color: #bec5ce; }
.form-control:focus { border-color: #68727f; box-shadow: 0 0 0 3px rgba(75, 85, 99, .12); }
.form-group label, .control-label { color: #505965; }
input[type=checkbox], input[type=radio] { accent-color: #4b5563; }
.btn, .btn-default { color: #454e5b; border-color: #cbd1d9; }
.btn-default:hover, .btn-default:focus { color: #252c35; background-color: #f0f2f4; border-color: #a9b2be; }
.btn-primary,
.btn-success,
.panelLogin .btn-login { box-shadow: 0 5px 14px rgba(35, 42, 52, .13) !important; }
.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.panelLogin .btn-login:hover,
.panelLogin .btn-login:focus { background: linear-gradient(135deg, #374151, #4b5563) !important; }
.newButton { box-shadow: 0 10px 24px rgba(35, 42, 52, .2) !important; }
.newButton:hover { background-color: #374151 !important; }

:is(.btn-details, .btn-save, .btn-delete, .btn-cancel, .btn-search,
    .btn-addUser, .btn-trash, .btn-task, .btn-duplicate, .btn-clearFilter,
    .btn-addTaskSTD, .btn-addTaskCustom, .btn-exportExcel, .btn-exportExcelEsst,
    .btn-commit, .btn-Plus, .btn-Paste, .btn-Import, .btnRefresh,
    .btnExpandAll, .btnSend, .btn-Template, .btn-pic-update,
    .predecessorButton, .successorButton, .backButton a) {
    border-color: #d5dae0 !important;
    box-shadow: 0 5px 14px rgba(35, 42, 52, .05) !important;
}
:is(.btn-save, .btn-search, .btn-cancel, .btn-clearFilter, .backButton a) { filter: grayscale(1); }
:is(.btn-details, .btn-save, .btn-cancel, .btn-search,
    .btn-addUser, .btn-task, .btn-duplicate, .btn-clearFilter,
    .btn-addTaskSTD, .btn-addTaskCustom, .btn-exportExcel, .btn-exportExcelEsst,
    .btn-commit, .btn-Plus, .btn-Paste, .btn-Import, .btnRefresh,
    .btnExpandAll, .btnSend, .btn-Template, .btn-pic-update,
    .predecessorButton, .successorButton, .backButton a):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
    background-color: #e9edf1 !important;
    border-color: #909ba8 !important;
    box-shadow: 0 0 0 2px rgba(75, 85, 99, .18) !important;
}
.nav.nav-pills.nav-stacked { background: #f7f8f9; }
.nav.nav-pills li a { color: #505965 !important; }
.nav.nav-pills li a:hover { background: #e9edf1 !important; color: #2d333b !important; }
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    color: #ffffff !important;
    background: linear-gradient(135deg, #4b5563, #626c78) !important;
}
.modal-content { border-color: #d5dae0; box-shadow: 0 24px 70px rgba(35, 42, 52, .22); }
.modal-header, .modal-footer { background: #f7f8f9; }
#DetailView { box-shadow: 0 26px 90px rgba(35, 42, 52, .25); }
#overlay { color: #505965 !important; }
.spinner { border-color: #68727f !important; border-right-color: transparent !important; }
.rigaSelezionata { background: #e9edf1 !important; }
table thead th > .filterboxContain > .filter:hover { background-color: #e1e6ec; box-shadow: 0 0 0 3px #e1e6ec; }

.tp-login-header { color: #2d333b; }
.tp-login-header p { color: #5e6874; }
.panelLogin.tp-login-panel,
.panelLogin {
    background: linear-gradient(145deg, #ffffff, #f8f9fa) !important;
    border-color: #d5dae0;
    box-shadow: 0 24px 70px rgba(35, 42, 52, .12);
}
.panelLogin a { color: #454e5b; text-decoration: underline; text-underline-offset: 3px; }
.tp-footer,
body.tp-authenticated .tp-footer {
    color: #5e6874 !important;
    background: linear-gradient(180deg, #e8eaed, #f8f9fa);
}
.tp-footer strong { color: #2d333b; }
.tp-footer-tagline, .tp-footer-description { color: #5e6874; }
.tp-footer-wave-fill { fill: #e8eaed; }
.tp-footer-wave-line { stroke: #c7cdd5; }

/* Construction workspace: share the same neutral palette. Status colours
   remain semantic so errors, approvals and missing prices stay recognisable. */
.oh-app {
    --oh-ink: #2d333b;
    --oh-muted: #5e6874;
    --oh-green: #4b5563;
    --oh-border: #dce0e5;
}
.oh-app button:focus-visible,
.oh-app a:focus-visible,
.oh-app input:focus-visible,
.oh-app select:focus-visible,
.oh-app textarea:focus-visible { outline-color: #4b5563; }
.oh-btn { border-color: #bec5ce; background: linear-gradient(180deg, #ffffff, #f7f8f9); }
.oh-btn:hover { background: #edf0f3; }
.oh-btn.oh-primary { background: linear-gradient(135deg, #4b5563, #626c78); border-color: #4b5563; }
.oh-btn.oh-primary:hover { background: linear-gradient(135deg, #374151, #4b5563); }
.oh-card,
.oh-metric { background: linear-gradient(145deg, #ffffff 55%, #f7f8f9); box-shadow: 0 3px 10px rgba(35, 42, 52, .03); }
.oh-metric:hover { border-color: #9da7b3; background: linear-gradient(145deg, #ffffff, #edf0f3); }
.oh-workflow li { border-left-color: #c7ced7; }
.oh-app input:not([type=checkbox]),
.oh-app select,
.oh-app textarea { color: #2d333b; border-color: #bec5ce; }
.oh-app input[readonly] { background: #f1f3f5; }
.oh-table td, .oh-revision { border-color: #e9ecf0; }
.oh-badge { background: #edf0f3; color: #56606c; }
.oh-dialog { background: linear-gradient(145deg, #ffffff, #f8f9fa); box-shadow: 0 25px 80px rgba(35, 42, 52, .25); }
.oh-dialog::backdrop { background: rgba(35, 42, 52, .45); }
.oh-assistance { border-color: #cbd2db; background: linear-gradient(145deg, #f0f2f5, #ffffff); }
.oh-assistance-sources, .oh-assistance-mode { border-color: #d5dae0; }
.oh-assistance-notice { background: #edf0f4; border-left-color: #7c8795; color: #454e5b; }
.oh-assistance-evidence { color: #505965; }
.oh-assistance-warnings { color: #5e6874; }
