/*
 * TeamProject UI theme v1
 * Visual language aligned with AirBox while retaining TeamProject's purple palette.
 * This stylesheet intentionally overrides legacy presentation only; it does not alter application behavior.
 */
:root {
    --tp-bg-deep: #120326;
    --tp-bg: #1b0638;
    --tp-nav: #16052e;
    --tp-nav-2: #26084d;
    --tp-purple: #7a28ff;
    --tp-purple-2: #a84bf7;
    --tp-pink: #db54db;
    --tp-cyan: #54d6ff;
    --tp-ink: #21152f;
    --tp-muted: #756b86;
    --tp-line: #e8e0f2;
    --tp-surface: #f8f6fc;
    --tp-card: #ffffff;
    --tp-success: #19b982;
    --tp-warning: #f2a51a;
    --tp-danger: #df405d;
    --tp-shadow: 0 16px 42px rgba(35, 10, 72, .18);
    --tp-shadow-soft: 0 8px 24px rgba(55, 20, 105, .09);
    --tp-radius: 18px;
}

html { height: 100%; }

body {
    min-height: 100%;
    padding: 0 !important;
    margin: 0;
    color: var(--tp-ink);
    background:
        radial-gradient(ellipse at 2% 65%, rgba(122, 40, 255, .34) 0, transparent 30%),
        radial-gradient(ellipse at 92% 2%, rgba(219, 84, 219, .25) 0, transparent 42%),
        linear-gradient(135deg, #120326, #26084d 55%, #13052d);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
}

body.tp-authenticated {
    height: 100vh;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.tp-login {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 65%, rgba(122, 40, 255, .42), transparent 35%),
        radial-gradient(circle at 88% 14%, rgba(219, 84, 219, .32), transparent 34%),
        linear-gradient(135deg, #100222, #26084d 55%, #16042f) !important;
}

*:focus-visible {
    outline: 3px solid rgba(174, 76, 255, .45);
    outline-offset: 2px;
}

/* Scrollbars: same treatment as AirBox, purple TeamProject palette. */
* { scrollbar-width: thin; scrollbar-color: #8b46f8 transparent; }
@supports selector(::-webkit-scrollbar) {
    *::-webkit-scrollbar { width: 9px; height: 9px; }
    *::-webkit-scrollbar-track { background: transparent; border-radius: 20px; }
    *::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #d06aff, #7c36ff);
        border: 3px solid transparent;
        background-clip: padding-box;
        border-radius: 20px;
        min-height: 36px;
    }
    *::-webkit-scrollbar-thumb:hover,
    *::-webkit-scrollbar-thumb:active {
        border-width: 1px;
        background: #8b38ff;
        background-clip: padding-box;
    }
    *::-webkit-scrollbar-corner { background: transparent; }
}

/* Top bar */
.tp-topbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 104px;
    padding: 20px 30px 18px;
    color: #fff;
}

.tp-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 310px;
    color: #fff !important;
    text-decoration: none !important;
}

.tp-brand:hover,
.tp-brand:focus { color: #fff !important; text-decoration: none !important; }

.tp-brand-mark {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px solid rgba(224, 147, 255, .7);
    background: linear-gradient(145deg, #2d095c, #8e30ff);
    box-shadow: 0 0 28px rgba(174, 76, 255, .45), inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.tp-brand-mark svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tp-brand-name {
    font-size: 2.35rem;
    line-height: .92;
    letter-spacing: -1.5px;
    font-weight: 700;
    white-space: nowrap;
}

.tp-brand-name strong { color: #ce6cff; font-weight: 650; }

.tp-brand-tagline {
    display: block;
    margin-top: 10px;
    color: #d7c5e7;
    font-size: .64rem;
    font-weight: 500;
    letter-spacing: .22em;
}

.tp-page-context {
    min-width: 0;
    margin-left: auto;
    color: rgba(255, 255, 255, .76);
    font-size: .82rem;
    letter-spacing: .03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User area: keep existing logout/settings endpoints and form. */
.tp-topbar #logoutForm {
    margin: 0 !important;
    padding-left: 18px;
    border-left: 1px solid rgba(216, 178, 245, .25);
}

.tp-topbar .userLogin {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 7px;
    background: none !important;
}

.tp-topbar .userLogin li,
.tp-topbar .userLogin:hover li,
.tp-topbar .userLogin li:hover {
    display: block !important;
    position: static !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.tp-topbar .userLogin li:first-child span {
    display: block;
    max-width: 230px;
    padding: 9px 12px !important;
    overflow: hidden;
    color: #efe5f8 !important;
    font-size: .84rem !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tp-topbar .userLogin a,
.tp-topbar .userLogin button {
    display: inline-flex !important;
    align-items: center;
    min-height: 40px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 9px 13px !important;
    border: 1px solid rgba(223, 189, 248, .20) !important;
    border-radius: 11px !important;
    color: #f5ecfb !important;
    background: rgba(255, 255, 255, .06) !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.tp-topbar .userLogin a:hover,
.tp-topbar .userLogin button:hover {
    border-color: rgba(223, 189, 248, .42) !important;
    background: rgba(122, 40, 255, .22) !important;
}

/* Main shell */
.tp-shell {
    width: calc(100% - 20px);
    max-width: none;
    margin: 0 10px;
    padding: 0;
    flex: 1 1 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    overflow: hidden;
}

.tp-shell-login {
    display: block;
    width: min(1180px, calc(100% - 30px));
    margin: 0 auto;
    overflow: visible;
}

/* Sidebar */
.tp-sidebar.navSpecial {
    display: flex;
    flex-direction: column;
    width: 236px !important;
    height: 100% !important;
    min-height: 0;
    padding: 20px 14px 16px;
    overflow: auto;
    color: #e5d8f1;
    background: linear-gradient(150deg, rgba(18, 3, 38, .97), rgba(37, 4, 79, .95));
    border: 1px solid rgba(205, 110, 255, .36);
    border-right: 0;
    border-radius: 20px 0 0 20px;
    box-shadow: -6px 0 22px rgba(206, 108, 255, .10), inset 0 0 0 1px rgba(255,255,255,.02);
}

.tp-sidebar-title {
    padding: 0 12px 11px;
    color: #a994bd;
    font-size: .66rem;
    letter-spacing: .15em;
    font-weight: 700;
}

.tp-sidebar nav { float: none !important; width: 100%; }

.tp-sidebar .menuCentrale {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    gap: 6px;
    float: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.tp-sidebar .menuCentrale li {
    /* The rounded link paints the selection; hide the legacy .active rectangle. */
    background: transparent !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.tp-sidebar .menuCentrale li a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100% !important;
    min-height: 46px;
    margin: 0 !important;
    padding: 10px 11px !important;
    border-radius: 11px;
    color: #d9cce8 !important;
    background: transparent !important;
    font-size: .80rem;
    font-weight: 650 !important;
    line-height: 1.18;
    text-align: left !important;
    text-decoration: none !important;
    transition: background .15s, box-shadow .15s, color .15s, transform .15s;
}

.tp-sidebar .menuCentrale li a:hover,
.tp-sidebar .menuCentrale li.active a {
    color: #fff !important;
    background: linear-gradient(115deg, rgba(122,40,255,.88), rgba(62,17,129,.94)) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 8px 20px rgba(123,37,255,.22);
}

.tp-sidebar .menuCentrale li a:hover { transform: translateX(2px); }

.tp-sidebar .menuCentrale li img,
.tp-sidebar .tp-nav-svg {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .90;
}

.tp-sidebar .tp-nav-svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: none;
}

.tp-sidebar .menuCentrale li span {
    display: block !important;
    width: auto !important;
    min-width: 0;
    text-align: left !important;
}

.tp-sidebar .logo { display: none !important; }

.tp-sidebar-foot {
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(205, 110, 255, .25);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(49, 13, 91, .82), rgba(20, 7, 45, .92));
    color: #cdbddd;
    font-size: .72rem;
    line-height: 1.5;
}

.tp-sidebar-foot strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: .82rem;
}

/* Main workspace */
.body-content.tp-main {
    width: auto !important;
    max-width: none !important;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 24px !important;
    overflow: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, #f7f5fb, #fff 28%);
    border: 1px solid rgba(255,255,255,.58);
    border-left: 0;
    border-radius: 0 20px 20px 0;
    box-shadow: var(--tp-shadow);
}

.tp-main > div:first-child,
.tp-main > form:first-child,
.tp-main > section:first-child { min-width: 0; }

/* Page headings / legacy top panel */
.topPanel,
.topPanel.bgGreen,
.topPanel.bgRed,
.topPanel.bgBlue1,
.topPanel.bgGold1 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    margin: 0 0 20px !important;
    padding: 15px 18px !important;
    overflow: visible;
    color: var(--tp-ink) !important;
    background: linear-gradient(180deg, #fff, #fcf9ff) !important;
    border: 1px solid var(--tp-line) !important;
    border-radius: 16px !important;
    box-shadow: var(--tp-shadow-soft) !important;
}

.topPanel h1,
.topPanel h2,
.topPanel h3,
.projectTitle,
.tp-main > h1,
.tp-main > h2 {
    color: var(--tp-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    letter-spacing: -.02em;
}

.topPanel h1,
.topPanel h2 { margin: 0 !important; font-size: 1.55rem; font-weight: 700; }
.topPanel h4 { margin: 6px 0 0; color: var(--tp-muted); font-size: .88rem; font-weight: 400; }
.projectTitle { margin: 2px 0 16px; font-size: 1.65rem; font-weight: 700; }

/* Cards and dashboard */
.container-home {
    height: auto !important;
    min-height: 320px;
    margin: 10px !important;
    width: calc(50% - 20px) !important;
    padding: 16px 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #fff, #fdfbff) !important;
    border: 1px solid var(--tp-line);
    border-radius: 16px !important;
    box-shadow: var(--tp-shadow-soft);
}

.label-home,
.label-chart {
    color: var(--tp-ink);
    font-size: 1rem !important;
    font-weight: 700;
}

.container-content,
.container-content-chart { min-height: 225px; }


/* Dashboard home */
.tp-main > .text-center:first-child {
    margin-bottom: 18px;
    padding: 15px 18px;
    text-align: left !important;
    background: linear-gradient(180deg, #fff, #fcf9ff);
    border: 1px solid var(--tp-line);
    border-radius: 16px;
    box-shadow: var(--tp-shadow-soft);
}
.tp-main > .text-center:first-child .display-4 {
    margin: 0;
    color: var(--tp-ink);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.elem-list {
    position: relative;
    display: block;
    margin: 0 0 8px;
    padding: 10px 12px 10px 28px !important;
    color: #4d3c5a;
    background: #faf7fd;
    border: 1px solid #eee7f5;
    border-radius: 10px;
    list-style: none;
}
.elem-list::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 15px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tp-purple);
    box-shadow: 0 0 0 4px rgba(122,40,255,.10);
}
.elem-list a { color: #5f24b6; text-decoration: none; }
.elem-list a:hover { text-decoration: underline; }

/* Tables */
.table {
    width: 100%;
    margin-bottom: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tp-line);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 5px 16px rgba(55, 20, 105, .05);
}

thead,
.tableHeader,
.table > thead > tr > th {
    background: #f3edf9 !important;
    color: #655676 !important;
}

thead tr th,
thead tr th a,
.table > thead > tr > th > a {
    color: #655676 !important;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
    text-decoration: none !important;
}

.table > thead > tr > th,
.table > tbody > tr > td,
.table > tbody > tr > th {
    padding: 12px 13px !important;
    border-color: #eee8f4 !important;
    vertical-align: middle !important;
}

.table > tbody > tr:nth-child(odd),
.table > tbody > tr:nth-child(even) { background: #fff !important; }
.table > tbody > tr:hover { background: #faf6ff !important; }

/* Forms */
.form-control,
select.form-control,
input.form-control,
textarea.form-control {
    min-height: 40px;
    color: var(--tp-ink);
    background: #fff;
    border: 1px solid #ded4eb;
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus {
    border-color: #a879eb;
    box-shadow: 0 0 0 3px rgba(122, 40, 255, .10);
}

.form-group label,
.control-label { color: #5f526d; font-size: .84rem; font-weight: 650; }

/* Bootstrap/default buttons */
.btn,
.btn-default {
    border-radius: 10px;
    border-color: #ded4eb;
    background-color: #fff;
    color: #453451;
    box-shadow: none;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.btn-default:hover,
.btn-default:focus {
    color: #502091;
    background-color: #faf5ff;
    border-color: #c8afe7;
}

.btn-primary,
.btn-success {
    color: #fff !important;
    background: linear-gradient(135deg, var(--tp-purple), var(--tp-purple-2)) !important;
    border-color: transparent !important;
    box-shadow: 0 7px 18px rgba(122, 40, 255, .22) !important;
}

.btn-danger { border-radius: 10px; }

/* Legacy icon-only controls: same functions, new visual assets. */
.newButton,
.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 {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    padding: 0 !important;
    border: 1px solid #dfd5ec !important;
    border-radius: 12px !important;
    background-color: #fff !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 20px 20px !important;
    box-shadow: 0 5px 14px rgba(58, 19, 105, .09) !important;
}

.newButton {
    position: fixed !important;
    right: 30px !important;
    bottom: 30px !important;
    z-index: 1000 !important;
    width: 54px !important;
    height: 54px !important;
    border: 0 !important;
    border-radius: 16px !important;
    background-color: var(--tp-purple) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") !important;
    background-size: 24px 24px !important;
    box-shadow: 0 12px 26px rgba(122, 40, 255, .32) !important;
}

.newButton:hover { transform: translateY(-2px); opacity: 1 !important; background-color: #8b38ff !important; }

.btn-details {
    background-image: url('../images/btnEdit.png') !important;
}
.btn-save {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a28ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") !important;
}
.btn-delete,
.btn-trash {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23df405d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M7 7l1 13h8l1-13M10 11v5m4-5v5'/%3E%3C/svg%3E") !important;
}
.btn-cancel,
.btn-clearFilter {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23756882' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m7 7 10 10M17 7 7 17'/%3E%3C/svg%3E") !important;
}
.btn-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a28ff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") !important;
}

/* Secondary navigation */
.nav.nav-pills.nav-stacked {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
    padding: 8px;
    border: 1px solid var(--tp-line);
    border-radius: 14px;
    background: #fbf9fe;
}

.nav.nav-pills li a {
    padding: 10px 11px;
    color: #594865 !important;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 650 !important;
}

.nav.nav-pills li a:hover { background: #f1e8fb !important; color: #6324bd !important; }

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    color: #fff !important;
    background: linear-gradient(135deg, #7130dd, #8c3aff) !important;
}

/* Project/detail two-column pages */
.tp-main .row { margin-left: -8px; margin-right: -8px; }
.tp-main .row > [class*="col-"] { padding-left: 8px; padding-right: 8px; }

/* Back action */
.backButton { height: 58px; }
.backButton a {
    width: 42px !important;
    height: 42px !important;
    left: 8px !important;
    top: 6px !important;
    border: 1px solid #ded4eb;
    border-radius: 12px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a28ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") !important;
    background-size: 22px 22px !important;
    background-position: center !important;
    box-shadow: 0 5px 14px rgba(58, 19, 105, .09) !important;
}

/* Modals */
.modal-content {
    overflow: hidden;
    border: 1px solid #e5daef;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(27, 6, 56, .28);
}
.modal-header,
.modal-footer { background: #faf7fd; border-color: var(--tp-line); }
.modal-title { color: var(--tp-ink); font-weight: 700; }
.modal-backdrop.in { opacity: .48; }

#DetailView {
    position: fixed !important;
    z-index: 3000 !important;
    top: 7vh !important;
    left: 50% !important;
    width: min(1000px, 88vw) !important;
    max-height: 86vh;
    margin: 0 !important;
    padding: 22px !important;
    overflow: auto !important;
    transform: translateX(-50%);
    color: var(--tp-ink);
    background: #fff !important;
    border: 1px solid var(--tp-line);
    border-radius: 18px;
    box-shadow: 0 26px 90px rgba(20, 4, 46, .36);
}

/* Overlay */
#overlay {
    color: #5f526d !important;
    background: rgba(255, 255, 255, .82) !important;
    backdrop-filter: blur(4px);
}
.spinner {
    border-color: #a448f0 !important;
    border-right-color: transparent !important;
}

/* Pagination and size selector */
.gridSize { width: auto !important; min-width: 210px; }
.gridSize .form-control { display: inline-block; width: auto !important; }

/* Home status / notifications */
.span-not { color: var(--tp-danger) !important; }
.rigaSelezionata { background: #eee4f8 !important; }

/* Footer */
.tp-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-height: 46px;
    margin: 0 !important;
    padding: 14px 30px 12px;
    color: #aa93bd !important;
    background: transparent;
    border: 0 !important;
    font-size: .72rem;
}
.tp-footer strong { color: #d6c3e7; font-weight: 600; }

/* Login */
.tp-login-header {
    width: min(1180px, calc(100% - 30px));
    margin: 0 auto;
    padding: 46px 8px 22px;
    color: #fff;
}
.tp-login-header .tp-brand { min-width: 0; display: inline-flex; }
.tp-login-header p { max-width: 520px; margin: 18px 0 0 67px; color: #cfbddf; font-size: .88rem; }

.panelLogin.tp-login-panel,
.panelLogin {
    float: none !important;
    position: relative !important;
    top: auto !important;
    width: min(500px, 100%) !important;
    margin: 24px 0 70px auto !important;
    padding: 28px 30px !important;
    color: var(--tp-ink);
    background: rgba(255,255,255,.97) !important;
    border: 1px solid rgba(231, 215, 245, .86);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 2, 36, .34);
}

.panelLogin .logoLogin { display: none; }
.panelLogin h2 { margin: 0 0 18px; font-size: 1.45rem; font-weight: 700; }
.panelLogin h4 { color: var(--tp-muted); font-size: .90rem; font-weight: 400; }
.panelLogin hr { border-color: var(--tp-line); }
.panelLogin .btn-login {
    position: static !important;
    float: none !important;
    width: 100% !important;
    height: 44px !important;
    margin: 16px 0 2px !important;
    padding: 10px 18px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--tp-purple), var(--tp-purple-2)) !important;
    border: 0 !important;
    border-radius: 11px !important;
    box-shadow: 0 8px 20px rgba(122, 40, 255, .24) !important;
    font-size: .86rem;
    font-weight: 700;
}
.panelLogin a { color: #6d28d9; }

/* Responsive */
@media (max-width: 1180px) {
    .tp-topbar { gap: 14px; padding: 16px 20px; min-height: 88px; }
    .tp-brand { min-width: 250px; }
    .tp-brand-name { font-size: 2rem; }
    .tp-brand-mark { width: 48px; height: 48px; flex-basis: 48px; }
    .tp-shell { grid-template-columns: 205px minmax(0, 1fr); }
    .tp-sidebar.navSpecial { width: 205px !important; padding: 17px 10px; }
    .tp-sidebar .menuCentrale li a { font-size: .75rem; gap: 9px; }
    .tp-main { padding: 18px !important; }
    .container-home { width: calc(50% - 20px) !important; }
}

@media (max-width: 900px) {
    body.tp-authenticated { height: auto; min-height: 100vh; overflow: auto; }
    .tp-topbar { flex-wrap: wrap; }
    .tp-page-context { display: none; }
    .tp-topbar #logoutForm { margin-left: auto !important; }
    .tp-shell { display: block; min-height: 0; overflow: visible; }
    .tp-sidebar.navSpecial {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 8px;
        border-right: 1px solid rgba(205,110,255,.36);
        border-radius: 16px;
        overflow-x: auto;
    }
    .tp-sidebar-title,
    .tp-sidebar-foot { display: none; }
    .tp-sidebar .menuCentrale { display: flex !important; width: max-content !important; min-width: 100%; }
    .tp-sidebar .menuCentrale li { width: auto !important; }
    .tp-sidebar .menuCentrale li a { min-width: 132px; justify-content: center; }
    .body-content.tp-main { height: auto; min-height: 600px; border: 1px solid rgba(255,255,255,.58); border-radius: 16px; }
    .container-home { width: calc(100% - 20px) !important; }
    .tp-footer { padding: 14px 18px; }
}

@media (max-width: 650px) {
    .tp-topbar { align-items: flex-start; padding: 14px; }
    .tp-brand { min-width: 0; }
    .tp-brand-name { font-size: 1.6rem; }
    .tp-brand-tagline { font-size: .54rem; letter-spacing: .14em; }
    .tp-brand-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
    .tp-topbar #logoutForm { width: 100%; padding: 10px 0 0; border-left: 0; border-top: 1px solid rgba(216,178,245,.18); }
    .tp-topbar .userLogin { width: 100%; flex-wrap: wrap; }
    .tp-topbar .userLogin li:first-child { width: 100%; }
    .tp-topbar .userLogin li:first-child span { padding-left: 0 !important; }
    .tp-shell { width: calc(100% - 12px); margin: 0 6px; }
    .tp-sidebar .menuCentrale li a { min-width: 112px; padding: 9px !important; font-size: .70rem; }
    .tp-main { padding: 13px !important; }
    .topPanel { align-items: flex-start; min-height: 64px; }
    .topPanel h1, .topPanel h2 { font-size: 1.25rem; }
    .newButton { right: 16px !important; bottom: 18px !important; }
    .table { display: block; overflow-x: auto; }
    .tp-footer { flex-direction: column; gap: 4px; }
    .tp-login-header { padding-top: 25px; }
    .tp-login-header p { margin-left: 0; }
    .panelLogin.tp-login-panel, .panelLogin { margin: 10px auto 40px !important; padding: 22px 18px !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ========================================================================== */
/* TeamProject UI v1.2 - allineamento al mockup v2.1 fluid                   */
/* Sidebar più compatta, icone sottili, workspace centrale completamente fluid */
/* ========================================================================== */

body.tp-authenticated {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.tp-authenticated .tp-shell {
    width: calc(100% - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    min-height: 0;
    margin: 10px;
    grid-template-columns: 236px minmax(0, 1fr);
    align-items: stretch;
}

.tp-workspace {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fbff;
    border: 1px solid rgba(255, 255, 255, .42);
    border-left: 0;
    border-radius: 0 22px 22px 0;
    box-shadow: var(--tp-shadow);
}

.tp-workspace-login {
    width: 100%;
    min-width: 0;
}

/* Marchio nella sidebar, come nel mockup navigabile. */
.tp-sidebar-brand {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0 0 14px;
    padding: 5px 7px 15px;
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(213, 151, 255, .13);
}

.tp-sidebar-brand:hover,
.tp-sidebar-brand:focus {
    color: #fff !important;
    text-decoration: none !important;
}

.tp-sidebar-brand-mark {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(223, 144, 255, .62);
    border-radius: 12px;
    background: linear-gradient(145deg, #2a0857, #9736ff);
    box-shadow: 0 0 22px rgba(174, 76, 255, .33), inset 0 0 0 1px rgba(255,255,255,.05);
}

.tp-sidebar-brand-mark svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tp-sidebar-brand-copy {
    min-width: 0;
    display: block;
}

.tp-sidebar-brand-name {
    display: block;
    color: #fff;
    font-size: 1.03rem;
    font-weight: 680;
    line-height: 1;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.tp-sidebar-brand-name strong {
    color: #ce6cff;
    font-weight: 650;
}

.tp-sidebar-brand-tagline {
    display: block;
    margin-top: 5px;
    color: #cdbbde;
    font-size: .48rem;
    font-weight: 500;
    letter-spacing: .145em;
    white-space: nowrap;
}

.tp-sidebar.navSpecial {
    width: 236px !important;
    min-width: 236px;
    max-width: 236px;
    height: 100% !important;
    padding: 15px 12px 14px;
    border-radius: 22px 0 0 22px;
}

.tp-sidebar-title { display: none !important; }

.tp-sidebar .menuCentrale {
    gap: 4px;
}

/* Voci menu: più leggere e compatte rispetto alla versione precedente. */
.tp-sidebar .menuCentrale li a {
    min-height: 39px;
    gap: 9px;
    padding: 8px 10px !important;
    border-radius: 10px;
    font-size: .72rem !important;
    font-weight: 600 !important;
    line-height: 1.12;
    letter-spacing: .005em;
}

.tp-sidebar .menuCentrale li a:hover {
    transform: none;
    background: rgba(122, 40, 255, .18) !important;
    box-shadow: inset 0 0 0 1px rgba(206, 108, 255, .18);
}

.tp-sidebar .menuCentrale li.active a {
    background: linear-gradient(115deg, rgba(122,40,255,.88), rgba(56,15,120,.92)) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 7px 16px rgba(123,37,255,.18);
}

.tp-sidebar .menuCentrale li img,
.tp-sidebar .tp-nav-svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    flex: 0 0 18px;
    opacity: .84;
}

.tp-sidebar .tp-nav-svg {
    stroke-width: 1.55;
}

.tp-sidebar .menuCentrale li.active .tp-nav-svg,
.tp-sidebar .menuCentrale li a:hover .tp-nav-svg {
    opacity: 1;
}

.tp-sidebar .menuCentrale li span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tp-sidebar-foot {
    padding: 10px 11px;
    border-radius: 12px;
    font-size: .63rem;
    line-height: 1.42;
}

.tp-sidebar-foot strong {
    margin-bottom: 3px;
    font-size: .72rem;
    font-weight: 650;
}

/* Testata leggera dell'area centrale. Il brand ora è nella sidebar. */
.tp-workspace .tp-topbar {
    width: 100%;
    min-height: 70px;
    padding: 13px 22px;
    flex: 0 0 auto;
    gap: 12px;
    color: var(--tp-ink);
    background: linear-gradient(180deg, #ffffff, #fcfaff);
    border-bottom: 1px solid #ece5f7;
}

.tp-workspace .tp-page-context {
    margin: 0;
    padding-left: 3px;
    color: #6f6380;
    font-size: .77rem;
    font-weight: 600;
    letter-spacing: .015em;
}

.tp-workspace .tp-topbar #logoutForm {
    margin-left: auto !important;
    border-left-color: #eadff6;
}

.tp-workspace .tp-topbar .userLogin li:first-child span {
    color: #655874 !important;
    font-size: .76rem !important;
}

.tp-workspace .tp-topbar .userLogin a,
.tp-workspace .tp-topbar .userLogin button {
    min-height: 36px !important;
    padding: 7px 10px !important;
    color: #53238b !important;
    background: #fff !important;
    border-color: #e5daf2 !important;
    border-radius: 10px !important;
    font-size: .74rem !important;
    box-shadow: 0 3px 10px rgba(78,29,141,.05);
}

.tp-workspace .tp-topbar .userLogin a:hover,
.tp-workspace .tp-topbar .userLogin button:hover {
    color: #53238b !important;
    background: #faf5ff !important;
    border-color: #cdb9e8 !important;
}

/* Il contenuto usa realmente tutta la larghezza residua del browser. */
.body-content.tp-main {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    margin: 0 !important;
    padding: 22px !important;
    overflow: auto;
    background: linear-gradient(180deg, #f7faff 0%, #fff 28%);
    border: 0;
    border-radius: 0 0 22px 0;
    box-shadow: none;
}

body.tp-authenticated .tp-footer {
    display: none;
}

@media (max-width: 1180px) {
    body.tp-authenticated .tp-shell {
        grid-template-columns: 200px minmax(0, 1fr);
    }
    .tp-sidebar.navSpecial {
        width: 200px !important;
        min-width: 200px;
        max-width: 200px;
        padding: 13px 9px;
    }
    .tp-sidebar-brand-name { font-size: .92rem; }
    .tp-sidebar-brand-tagline { font-size: .43rem; }
    .tp-sidebar .menuCentrale li a {
        min-height: 37px;
        gap: 8px;
        padding: 7px 9px !important;
        font-size: .68rem !important;
    }
    .tp-sidebar .menuCentrale li img,
    .tp-sidebar .tp-nav-svg {
        width: 17px !important;
        height: 17px !important;
        min-width: 17px !important;
        flex-basis: 17px;
    }
}

@media (max-width: 900px) {
    body.tp-authenticated {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    body.tp-authenticated .tp-shell {
        width: calc(100% - 12px);
        height: auto;
        min-height: calc(100vh - 12px);
        margin: 6px;
        display: grid;
        grid-template-columns: 68px minmax(0, 1fr);
        overflow: visible;
    }
    .tp-sidebar.navSpecial {
        width: 68px !important;
        min-width: 68px;
        max-width: 68px;
        height: auto !important;
        margin: 0;
        padding: 11px 7px;
        border-right: 0;
        border-radius: 18px 0 0 18px;
        overflow: hidden;
    }
    .tp-sidebar-brand {
        justify-content: center;
        padding: 4px 0 12px;
    }
    .tp-sidebar-brand-copy,
    .tp-sidebar-foot {
        display: none !important;
    }
    .tp-sidebar-brand-mark {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
    .tp-sidebar .menuCentrale {
        display: grid !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    .tp-sidebar .menuCentrale li {
        width: 100% !important;
    }
    .tp-sidebar .menuCentrale li a {
        min-width: 0 !important;
        min-height: 38px;
        justify-content: center;
        padding: 8px 6px !important;
    }
    .tp-sidebar .menuCentrale li span {
        display: none !important;
    }
    .tp-workspace {
        border-radius: 0 18px 18px 0;
    }
    .body-content.tp-main {
        min-height: 620px;
        padding: 16px !important;
        border-radius: 0 0 18px 0;
    }
}

@media (max-width: 650px) {
    body.tp-authenticated .tp-shell {
        grid-template-columns: 60px minmax(0, 1fr);
    }
    .tp-sidebar.navSpecial {
        width: 60px !important;
        min-width: 60px;
        max-width: 60px;
        padding: 10px 6px;
    }
    .tp-sidebar-brand-mark {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .tp-workspace .tp-topbar {
        min-height: 62px;
        padding: 10px 12px;
    }
    .tp-workspace .tp-page-context {
        display: none;
    }
    .tp-workspace .tp-topbar #logoutForm {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        border: 0;
    }
    .body-content.tp-main {
        padding: 12px !important;
    }
}

/* ========================================================================== */
/* TeamProject UI v1.3 - menu leggibile, icone compatte                       */
/* Correzione richiesta: ridurre solo le icone senza comprimere le voci.      */
/* ========================================================================== */

@media (min-width: 1181px) {
    body.tp-authenticated .tp-shell {
        grid-template-columns: 244px minmax(0, 1fr);
    }

    .tp-sidebar.navSpecial {
        width: 244px !important;
        min-width: 244px;
        max-width: 244px;
        padding: 15px 12px 14px;
    }

    .tp-sidebar .menuCentrale {
        gap: 5px;
    }

    .tp-sidebar .menuCentrale li a {
        min-height: 46px;
        gap: 10px;
        padding: 10px 11px !important;
        border-radius: 11px;
        font-size: .80rem !important;
        font-weight: 620 !important;
        line-height: 1.18;
        letter-spacing: 0;
    }

    /* Solo le icone vengono realmente ridotte. */
    .tp-sidebar .menuCentrale li img,
    .tp-sidebar .tp-nav-svg {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        flex: 0 0 16px;
        opacity: .92;
    }

    .tp-sidebar .tp-nav-svg {
        stroke-width: 1.55;
    }

    /* Le etichette devono essere leggibili per intero su desktop. */
    .tp-sidebar .menuCentrale li span {
        min-width: 0;
        overflow: visible;
        white-space: nowrap;
        text-overflow: clip;
    }
}

/* Notebook / finestre meno larghe: non comprimere altezza e padding. */
@media (min-width: 901px) and (max-width: 1180px) {
    body.tp-authenticated .tp-shell {
        grid-template-columns: 226px minmax(0, 1fr);
    }

    .tp-sidebar.navSpecial {
        width: 226px !important;
        min-width: 226px;
        max-width: 226px;
        padding: 14px 10px;
    }

    .tp-sidebar-brand-name {
        font-size: .98rem;
    }

    .tp-sidebar-brand-tagline {
        font-size: .45rem;
    }

    .tp-sidebar .menuCentrale {
        gap: 4px;
    }

    .tp-sidebar .menuCentrale li a {
        min-height: 44px;
        gap: 9px;
        padding: 9px 10px !important;
        font-size: .75rem !important;
        font-weight: 610 !important;
        line-height: 1.16;
    }

    .tp-sidebar .menuCentrale li img,
    .tp-sidebar .tp-nav-svg {
        width: 15px !important;
        height: 15px !important;
        min-width: 15px !important;
        flex: 0 0 15px;
    }

    .tp-sidebar .menuCentrale li span {
        overflow: visible;
        white-space: nowrap;
        text-overflow: clip;
    }
}

/* ========================================================================== */
/* TeamProject UI v1.4 - scala chrome applicativo + allineamento menu         */
/* Richiesta: testi esterni al main leggibili; icone 20px; label menu offset. */
/* ========================================================================== */

/* Non ridimensiona i contenuti delle viste: interviene solo sul chrome. */
@media (min-width: 901px) {
    /* Marchio sidebar più leggibile. */
    .tp-sidebar-brand {
        gap: 11px;
        padding: 7px 8px 16px;
    }

    .tp-sidebar-brand-mark {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .tp-sidebar-brand-mark svg {
        width: 22px;
        height: 22px;
    }

    .tp-sidebar-brand-name {
        font-size: 1.08rem;
        line-height: 1.05;
    }

    .tp-sidebar-brand-tagline {
        margin-top: 6px;
        font-size: .54rem;
        line-height: 1.2;
        letter-spacing: .14em;
    }

    /* Menu: icone 20px. Non comprimere la voce per far entrare il testo. */
    .tp-sidebar .menuCentrale li a {
        min-height: 46px;
        padding: 10px 11px !important;
        gap: 0 !important;
        font-size: .80rem !important;
        line-height: 1.2;
    }

    .tp-sidebar .menuCentrale li img,
    .tp-sidebar .tp-nav-svg {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        flex: 0 0 20px !important;
    }

    .tp-sidebar .tp-nav-svg {
        stroke-width: 1.55;
    }

    .tp-sidebar .menuCentrale li span {
        display: block;
        margin-left: 17px;
        margin-top: -10px;
        overflow: visible;
        white-space: nowrap;
        text-overflow: clip;
    }

    /* Testata superiore: ripristino di una scala leggibile. */
    .tp-workspace .tp-topbar {
        min-height: 76px;
        padding: 15px 24px;
    }

    .tp-workspace .tp-page-context {
        font-size: .90rem;
        font-weight: 600;
        line-height: 1.3;
    }

    .tp-workspace .tp-topbar .userLogin {
        gap: 9px;
    }

    .tp-workspace .tp-topbar .userLogin li:first-child span {
        max-width: 260px;
        padding: 10px 13px !important;
        font-size: .88rem !important;
        line-height: 1.25 !important;
    }

    .tp-workspace .tp-topbar .userLogin a,
    .tp-workspace .tp-topbar .userLogin button {
        min-height: 40px !important;
        padding: 9px 13px !important;
        border-radius: 11px !important;
        font-size: .84rem !important;
        line-height: 1.2 !important;
    }

    /* Box informativo in fondo alla sidebar: non microscopico. */
    .tp-sidebar-foot {
        padding: 11px 12px;
        font-size: .70rem;
        line-height: 1.45;
    }

    .tp-sidebar-foot strong {
        font-size: .80rem;
    }
}

/* Su notebook riduco solo leggermente il font delle etichette, non il chrome. */
@media (min-width: 901px) and (max-width: 1180px) {
    .tp-sidebar .menuCentrale li a {
        font-size: .76rem !important;
    }

    .tp-sidebar .menuCentrale li img,
    .tp-sidebar .tp-nav-svg {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        flex-basis: 20px !important;
    }

    .tp-sidebar .menuCentrale li span {
        margin-left: 17px;
        margin-top: -10px;
    }

    .tp-workspace .tp-page-context {
        font-size: .86rem;
    }

    .tp-workspace .tp-topbar .userLogin li:first-child span {
        font-size: .84rem !important;
    }

    .tp-workspace .tp-topbar .userLogin a,
    .tp-workspace .tp-topbar .userLogin button {
        font-size: .81rem !important;
    }
}

/* ============================================================
   TeamProject UI v1.6 - dimensioni verificate con Chrome DevTools
   Valori richiesti, mantenuti prevalenti anche sui breakpoint desktop.
   ============================================================ */
.tp-sidebar-brand-name {
    font-size: 2.08rem !important;
}

.tp-sidebar-foot {
    font-size: 14px !important;
}

.tp-sidebar-foot strong {
    font-size: 14px !important;
}

.tp-workspace .tp-page-context {
    font-size: 1.9rem !important;
}

.tp-workspace .tp-topbar .userLogin li:first-child span {
    font-size: 1.9rem !important;
}

.tp-workspace .tp-topbar .userLogin a,
.tp-workspace .tp-topbar .userLogin button {
    font-size: 1.9rem !important;
}

.userLogin li button {
    top: 0 !important;
}


/* ============================================================
   TeamProject UI v1.7 - griglie dati / favicon / menu Day by Day
   ============================================================ */
thead tr th,
thead tr th a,
.table > thead > tr > th > a {
    font-size: 1.4rem !important;
}

/* ============================================================
   ORCHESTRIS UI v1.8.20 - compact Gantt headers
   gridify clones the grid header with class "table". Keep that
   clone out of the generic table card layout: the grid and SVG
   timeline both reserve 40px above the first task row.
   ============================================================ */
.gdfTable.ganttFixHead {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.gdfTable > thead > tr > th,
.gdfTable > thead > tr > th a {
    font-size: 14px !important;
    line-height: 18px;
    letter-spacing: normal;
    text-transform: none;
}

.gdfTable.ganttFixHead > thead > tr > th {
    padding: 2px !important;
    border-bottom: 2px solid #bbb !important;
    border-right: 1px solid #bbb !important;
}

.gdfTable.ganttFixHead > thead > tr > th:last-child {
    border-right: none !important;
}

.ganttHead1 th,
.ganttHead2 th {
    font-size: 12px !important;
    line-height: 16px;
    letter-spacing: normal;
    text-transform: none;
}

.ganttHead1 th.headSmall,
.ganttHead2 th.headSmall {
    font-size: 10px !important;
}


/* ============================================================
   ORCHESTRIS branding - UI v1.8.12
   Replaces previous TeamProject/Alstom visible logos with the
   approved ORCHESTRIS artwork while leaving functional icons intact.
   ============================================================ */
.tp-brand {
    min-width: 0 !important;
    gap: 0 !important;
}
.tp-brand-logo {
    display: block;
    width: min(360px, 82vw);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.tp-login-header .tp-brand-logo {
    width: min(360px, 82vw);
}
.tp-login-card-logo {
    display: block;
    width: min(300px, 100%);
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
}
.tp-sidebar-brand {
    justify-content: center;
    gap: 0 !important;
    min-height: 102px;
    padding: 4px 4px 14px !important;
}
.tp-sidebar-brand-logo {
    height: auto;
    object-fit: contain;
}
.tp-sidebar-brand-logo-full {
    display: block;
    width: 100%;
    max-width: 182px;
}
.tp-sidebar-brand-logo-mark {
    display: none;
    width: 42px;
    max-width: 42px;
}
@media (min-width: 901px) and (max-width: 1180px) {
    .tp-sidebar-brand-logo-full { max-width: 174px; }
    .tp-sidebar-brand { min-height: 96px; }
}
@media (max-width: 900px) {
    .tp-sidebar-brand { min-height: 54px; padding: 4px 0 12px !important; }
    .tp-sidebar-brand-logo-full { display: none !important; }
    .tp-sidebar-brand-logo-mark { display: block !important; width: 42px; max-width: 42px; }
}
@media (max-width: 650px) {
    .tp-sidebar-brand-logo-mark { width: 38px; max-width: 38px; }
}

/* Readable detail navigation and form guidance. Bootstrap 3 uses a 10px rem. */
.tp-main .nav.nav-pills > li > a,
.tp-main .nav.nav-tabs > li > a {
    font-size: 16px !important;
    line-height: 1.5;
    padding: 12px 14px;
    white-space: normal;
}

.body-content label,
.body-content .control-label,
.body-content .input-group-addon,
.modal label,
.modal .control-label {
    font-size: 15px !important;
    line-height: 1.5;
}

.body-content .help-block,
.body-content .form-text,
.body-content small,
.body-content .field-validation-error,
.body-content .validation-summary-errors,
.modal .help-block,
.modal .form-text,
.modal small,
.modal .field-validation-error {
    font-size: 14px !important;
    line-height: 1.5;
}

.body-content .form-control,
.modal .form-control {
    font-size: 16px;
}

/* Keep column filters beside the heading, including multiline headings. */
.table:has(> thead .filterboxContain) {
    overflow: visible;
}

table thead th:has(> .filterboxContain) {
    position: relative;
    padding-right: 36px !important;
}

table thead th > .filterboxContain {
    display: inline;
    position: static;
}

table thead th > .filterboxContain > .filter {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

table thead th > .filterboxContain > .filterbox {
    top: calc(100% + 6px);
    right: 0;
}

/* Change only the surface: background shorthand would erase icon images. */
: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):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
    background-color: #eee4ff !important;
    border-color: #a877ed !important;
    opacity: 1 !important;
    box-shadow: 0 0 0 2px rgba(122, 40, 255, .22) !important;
}

:is(.btn-delete, .btn-trash):not(:disabled):not(.disabled):is(:hover, :focus-visible) {
    background-color: #fff0f3 !important;
    border-color: #df405d !important;
    box-shadow: 0 0 0 2px rgba(223, 64, 93, .22) !important;
}

table thead th > .filterboxContain > .filter:hover {
    background-color: #e4d4ff;
    border-radius: 4px;
    box-shadow: 0 0 0 3px #e4d4ff;
    opacity: 1;
}

/* Curved footer, inspired by the Airbox mockup and adapted to Orchestris. */
.tp-footer,
body.tp-authenticated .tp-footer {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    flex: 0 0 auto;
    gap: 12px 24px;
    min-height: 64px;
    padding: 16px 26px;
    color: #dfccef !important;
    background: linear-gradient(180deg, #1b0638, #2d0c52);
    font-size: 13px;
    line-height: 1.5;
    isolation: isolate;
}

.tp-footer-wave {
    position: absolute;
    top: -24px;
    left: 0;
    width: 100%;
    height: 26px;
    overflow: visible;
    pointer-events: none;
}
.tp-footer-wave-fill { fill: #1b0638; }
.tp-footer-wave-line { fill: none; stroke: #a84bf7; stroke-width: 1; vector-effect: non-scaling-stroke; }
.tp-footer-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.tp-footer strong { color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.tp-footer-tagline { color: #c7aff1; }
.tp-footer-description { text-align: center; color: #f2e7ff; }
.tp-footer-copyright { text-align: right; }

body.tp-authenticated .tp-shell {
    height: auto;
    flex: 1 1 0;
    margin-bottom: 0;
}
body.tp-authenticated .tp-workspace { border-bottom-right-radius: 0; }
body.tp-authenticated .body-content.tp-main {
    border-bottom-right-radius: 0;
    padding-bottom: 48px !important;
}
body.tp-authenticated .tp-footer-wave { z-index: 1; }
body.tp-authenticated .newButton { bottom: 86px !important; }
body.tp-login {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
}
body.tp-login .tp-login-header { flex: 0 0 auto; }
body.tp-login .tp-shell-login {
    flex: 1 0 auto;
    min-height: auto;
    margin-bottom: 36px;
}
body.tp-login .tp-workspace-login { display: flow-root; }

@media (max-width: 900px) {
    .tp-footer,
    body.tp-authenticated .tp-footer {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 16px;
        padding: 14px 18px;
    }
    .tp-footer-description { grid-column: 1; grid-row: 2; text-align: left; }
    .tp-footer-copyright { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 550px) {
    .tp-footer,
    body.tp-authenticated .tp-footer { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .tp-footer-brand { justify-content: center; }
    .tp-footer-description,
    .tp-footer-copyright { grid-column: 1; grid-row: auto; text-align: center; }
    body.tp-authenticated .newButton { bottom: 120px !important; }
}

/* Keep the original sidebar dimensions; make only its entries more discreet. */
@media (min-width: 901px) {
    .tp-sidebar .menuCentrale { gap: 3px; }
    .tp-sidebar .menuCentrale li a {
        min-height: 40px;
        padding: 8px 9px !important;
        gap: 8px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        line-height: 1.35;
        align-items: center;
    }
    .tp-sidebar .menuCentrale li img,
    .tp-sidebar .tp-nav-svg {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        flex: 0 0 16px !important;
    }
    .tp-sidebar .menuCentrale li span {
        margin: 0;
        white-space: normal;
        overflow-wrap: break-word;
    }
}

/* Reset the legacy 20px label and its negative horizontal offset. */
.tp-sidebar .menuCentrale li > a > span {
    font-size: 14px !important;
    line-height: 1.35;
    position: static;
    inset: auto;
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    text-align: left;
}
