/* CSS per selettori di stato e tendine */
    .pto-status-select {
        appearance: none; 
        -webkit-appearance: none;
        -moz-appearance: none;
        border: none;
        padding: 4px 12px;
        text-align: center;
        cursor: pointer;
    }

    .pto-status-select option {
        background-color: white !important;
        color: #333 !important;
        text-align: left;
        padding: 10px;
    }

    .pto-status-select:focus { 
        outline: none; 
    }

    /* CSS per contenitore principale Kanban */
    #kanban-container {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 20px;
        overflow-x: auto;
        background-color: #f4f6f9;
        min-height: calc(100vh - 180px);
        width: 100%;
    }

    /* CSS per singola colonna */
    .kanban-column {
        flex: 0 0 320px;
        background-color: #ffffff; 
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 220px);
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08); 
    }

    .kanban-header {
        padding: 15px;
        font-weight: 800;
        color: #4b5563;
        text-transform: uppercase;
        font-size: 0.85rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255,255,255,0.3);
        border-radius: 10px 10px 0 0;
    }

    .kanban-items {
        padding: 10px;
        overflow-y: auto;
        flex-grow: 1;
        min-height: 100px;
        max-height: calc(100vh - 250px);
        scrollbar-width: thin;
        scrollbar-color: #d1d5db transparent;
    }

    /* CSS per card task */
    .kanban-card {
        border-radius: 8px;
        padding: 14px;
        margin-bottom: 12px;
        transition: all 0.2s ease;
        cursor: pointer;
        position: relative;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08); 
        border: none;
    }

    .kanban-card:hover {
        transform: translateX(4px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    }

    .kanban-card-title {
        font-weight: 600;
        font-size: 0.95rem;
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .kanban-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.75rem;
        color: #6b7280;
        margin-top: 8px;
    }


    /* Modifica dell'header della Board Task */
    .custom-board-header {
        background: linear-gradient(135deg, #18355D 0%, #0d1e35 100%);
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(24, 53, 93, 0.3);
        border-left: 6px solid #C44D20;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .board-icon-wrapper {
        width: 54px;
        height: 54px;
        background: radial-gradient(circle, #C44D20 0%, #a13d18 100%);
        border-radius: 50%;
        box-shadow: 0 0 15px rgba(196, 77, 32, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 1rem;
    }

    .board-title-main {
        color: #ffffff;
        font-weight: 700;
        letter-spacing: -0.5px;
        font-size: 1.55rem;
        margin-bottom: 0;
    }

    .board-subtitle {
        color: #adb5bd;
        font-size: 0.85rem;
        margin-bottom: 0;
        font-weight: 400;
    }

    .board-subtitle strong {
        color: #C44D20;
    }

    .btn-create-task {
        background-color: #C44D20 !important;
        border: 2px solid #C44D20 !important;
        color: #ffffff !important;
        border-radius: 10px;
        padding: 10px 24px;
        font-weight: 700;
        height: 48px;
        display: flex;
        align-items: center;
        box-shadow: 0 4px 15px rgba(196, 77, 32, 0.3);
        transition: all 0.3s ease;
    }

    .btn-create-task:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(196, 77, 32, 0.5);
        filter: brightness(1.1);
    }

    /* --- STILE SPECIFICO PER TABELLA E TABS --- */
    .header-table-accent {
        background: #C44D20 !important;
        color: white !important;
        border-left: 6px solid #18355D !important;
        border-radius: 10px 10px 0 0 !important;
        padding: 1rem 1.25rem !important;
        box-shadow: 0 4px 12px rgba(196, 77, 32, 0.2);
    }

    .header-table-accent .card-title {
        color: white !important;
        font-weight: 700 !important;
        margin-bottom: 0;
        font-size: 1.15rem;
    }

    .nav-pills .custom-tab-link {
        color: #18355D !important;
        font-weight: 700;
        border: 1px solid #dee2e6;
        margin-right: 8px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-pills .custom-tab-link.active {
        background-color: #18355D !important; 
        color: white !important;
        border-color: #18355D;
        box-shadow: 0 4px 10px rgba(24, 53, 93, 0.2);
    }

    .nav-pills .custom-tab-link:hover:not(.active) {
        background-color: rgba(24, 53, 93, 0.05);
    }

    /* Custom per le modal */
    .bg-brand-header {
        background-color: #18355D !important;
    }

    .border-orange-accent {
        border-bottom: 4px solid #C44D20 !important;
    }

    .text-white-modal {
        color: #ffffff !important;
    }

    .text-orange {
        color: #C44D20 !important;
    }

    /* Modal dettagli task */
    .modal-details-theme .modal-header {
        background-color: #18355D;
        border-bottom: 4px solid #C44D20;
        padding: 1.5rem 2rem;
    }

    .modal-details-theme .modal-title {
        color: #ffffff;
        font-weight: 700;
        text-transform: uppercase;
    }

    .user-visual-id {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: #ffffff;
        margin-right: 0.75rem;
        flex-shrink: 0;
    }

    .deadline-status-box {
        background-color: #fff5f5;
        border: 1px solid #feb2b2;
        padding: 0.75rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
    }

    .technical-description-container {
        background-color: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 1.5rem;
        min-height: 250px;
        line-height: 1.8;
        white-space: pre-wrap;
        color: #334155;
    }

    /* Contenitore WBS */
    .wbs-container { 
        font-family: sans-serif; 
        font-size: 1.1rem; 
    }
    
    .task-row {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        margin-bottom: 8px;
        border-radius: 8px;
        transition: all 0.2s;
        background: #fff;
        border: 1px solid #e2e8f0;
    }

    .task-row:hover { 
        background-color: #f0f7ff; 
        border-color: #bee3f8; 
    }

    .task-content { 
        cursor: pointer; 
        flex-grow: 1; 
        display: flex; 
        align-items: center; 
        gap: 10px;
    }

    .task-parent-text { font-weight: 700; color: #1a202c; font-size: 1.15rem; }
    .task-child-text { font-weight: 500; color: #2d3748; font-size: 1.05rem; }
    
    .action-icon {
        cursor: pointer;
        padding: 5px;
        border-radius: 4px;
        transition: transform 0.1s;
    }
    
    .action-icon:hover { transform: scale(1.2); }
    .icon-nav { color: #007bff; margin-left: 5px; } 
    .icon-add { color: #28a745; margin-right: 5px; }

    .subtask-list { 
        padding-left: 35px; 
        margin-left: 22px; 
        border-left: 3px solid #cbd5e0; 
    }

    .phase-header {
        background: rgba(196, 77, 32, 0.9) !important;
        color: white !important;
        border-left: 6px solid #18355D !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(196, 77, 32, 0.2) !important;
        display: flex;
        align-items: center;
        width: 100%;
        backdrop-filter: blur(4px);
        min-height: unset !important;
    }

    .card-custom-action {
        border: 2px solid #fd7e14 !important;
        border-radius: 1.25rem !important; 
        transition: all 0.25s ease-in-out;
        background-color: #ffffff;
        cursor: pointer;
        overflow: hidden;
    }

    .card-custom-action:hover {
        transform: translateY(-3px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
        background-color: #fffaf5;
    }

    .card-custom-action.is-active {
        background-color: #fff5eb !important;
        border-color: #e36a00 !important;
        box-shadow: inset 0 0 8px rgba(253, 126, 20, 0.15);
    }

    .text-brand-orange {
        color: #fd7e14;
    }

    /* -- STILE UNIVERSALE PER LE CARD --- */
    .utility-card {
        border: none !important;
        border-radius: 10px !important;
        background-color: #fff;
        box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
        overflow: hidden;
    }

    .card-label-id {
        font-size: 11px;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .card-info-badge {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 0.8rem;
        color: #444;
    }

    .card-actions-group {
        display: flex;
        align-items: center;
        gap: 20px;
        border-left: 1px solid #f0f0f0;
        padding-left: 20px;
    }

    /* STILE UNIVERSALE PER LISTA DI CARD */
    .master-list-wrapper {
        border: none;
        background: transparent;
        padding: 5px;
    }

    .master-list-row {
        cursor: pointer;
        margin-bottom: 8px;
        padding: 12px 15px;
        display: flex;
        align-items: center;
        background: #fff;
        border: 1px solid #edf2f7 !important;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        transition: all 0.2s ease;
    }

    .master-list-row:hover {
        background-color: #fff;
        transform: translateX(4px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-color: #f97316 !important;
    }

    .list-status-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .list-row-main-text {
        font-weight: 600;
        font-size: 0.9rem;
        color: #2d3748;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .list-row-sub-text {
        font-size: 0.75rem;
        color: #a0aec0;
        margin-top: 2px;
        font-weight: 500;
    }

    .list-row-progress-container {
        text-align: right;
        margin-left: 15px;
        min-width: 65px;
    }

    .list-row-progress-container div:first-child {
        font-size: 0.75rem !important;
        letter-spacing: -0.5px;
    }

    .list-progress-bar-bg {
        height: 3px;
        background: #f1f5f9;
        width: 100%;
        border-radius: 2px;
        overflow: hidden;
    }

    .search-wrapper {
        position: relative;
        margin-bottom: 15px;
        padding: 0 5px;
    }

    /* STILE PER BARRA DI RICERCA */
        .search-wrapper {
        position: relative;
        margin-bottom: 20px;
        padding: 0 5px;
    }

    .search-input {
        width: 100%;
        padding: 10px 15px 10px 40px;
        border-radius: 8px;
        background-color: #f1f4f8; 
        border: 1px solid #d1d9e2; 
        font-size: 0.9rem;
        color: #4a5568;
        outline: none;
        transition: all 0.2s ease-in-out;
    }

    .search-input::placeholder {
        color: #718096; 
    }

    .search-input:focus {
        background-color: #fff;
        border-color: #f97316 !important; 
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    }

    .search-icon {
        position: absolute;
        left: 18px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8; 
        font-size: 0.85rem;
    }

    /*-- STILE PER L'ALBERATURA DELLE FASI --- */

    .task-node{
    background:#fff4e8;
    border:1px solid #ffd8b5;
    border-radius:8px;
    padding: 4px 10px !important;
    min-height: unset !important;
    }

    .task-root{
        border-radius:10px;
        padding:14px;
    }

    .task-clickable{cursor:pointer;}

    .task-chevron{cursor:pointer;}

    .task-chevron-small{
        cursor:pointer;
        font-size:.85rem;
    }

    .task-dot{
        font-size:.5rem;
        opacity:.3;
    }

    .task-text{
        cursor:pointer;
        line-height:1.3;
    }

    .task-badge{
        font-size:.85rem;
        min-width:50px;
        text-align:center;
    }

    .task-add-btn{
        font-size:.90rem;
        color:var(--bs-secondary);
        line-height: 1;
    }

    .task-tree{
        border-left:2px solid #ffe0c2;
        margin-left:12px;
        padding-left:18px;
    }

/* ========================================
   WRAPPER PROGETTI
======================================== */
.wrapper-progetti {
    gap: 12px;
}

.col-progetti {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    overflow: hidden;
}

#lista-progetti-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
/* ========================================
   WBS TOOLBAR
======================================== */
.wbs-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    border: 0.5px solid var(--color-border-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 8px 14px;
}

.wbs-toolbar-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wbs-toolbar-section-divider {
    padding-right: 14px;
    border-right: 0.5px solid var(--color-border-tertiary);
}

.wbs-toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ========================================
   WBS BADGE
======================================== */
.wbs-badge {
    min-width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    padding: 0 6px;
}

.wbs-badge-label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.wbs-badge-completati { background: #C0DD97; color: #27500A; }
.wbs-badge-scadenza   { background: #FAC775; color: #633806; }
.wbs-badge-scaduti    { background: #F7C1C1; color: #791F1F; }

/* ========================================
   WBS ACTIONS
======================================== */
.wbs-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* ========================================
   WBS TABLE
======================================== */
.wbs-table-wrapper {
    border-radius: 10px;
    overflow: hidden;
}
    


