
/* PDM - Product Data Management Style - RE-ALIGNED TO GLOBAL DESIGN */
.tecnico-container {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tecnico-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1e2e;
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 20px;
}

.tecnico-header h2 {
    font-size: 1.4rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tecnico-header h2 i {
    color: #cba6f7; /* Lavanda */
}

.tecnico-search-box {
    display: flex;
    gap: 0;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.tecnico-search-box input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 15px;
    width: 350px;
    outline: none;
    font-size: 0.9rem;
}

.tecnico-search-box .btn-search-pdm {
    background: #cba6f7; /* Lavanda */
    border: none;
    color: #11111b;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.tecnico-search-box .btn-search-pdm:hover {
    background: #89b4fa; /* Blu */
}

/* FILTRI PDM */
.pdm-filter-group {
    display: flex;
    background: rgba(0,0,0,0.2);
    padding: 2px;
    border-radius: 4px;
    margin-right: 10px;
}

.btn-pdm-filter {
    background: transparent;
    border: none;
    color: #585b70;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.btn-pdm-filter:hover {
    color: #cdd6f4;
}

.btn-pdm-filter.active {
    background: #cba6f7;
    color: #11111b;
}

/* BADGE TIPO (A, D, P) */
.type-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.75rem;
    display: inline-block;
}

.type-A { background: rgba(203, 166, 247, 0.1); color: #cba6f7; border: 1px solid rgba(203, 166, 247, 0.3); } /* Assieme - Viola */
.type-D { background: rgba(137, 180, 250, 0.1); color: #89b4fa; border: 1px solid rgba(137, 180, 250, 0.3); } /* Disegno - Blu */
.type-P { background: rgba(249, 226, 175, 0.1); color: #f9e2af; border: 1px solid rgba(249, 226, 175, 0.3); } /* Parte - Giallo */

.tecnico-results-table-wrapper {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.pdm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pdm-table th {
    position: sticky;
    top: 0;
    background: #181825;
    color: #fab387;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.pdm-table td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    color: #cdd6f4;
    vertical-align: middle;
}

.pdm-table tr:hover {
    background: rgba(250, 179, 135, 0.05);
}


.btn-icon-pdm {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #cdd6f4;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-icon-pdm:hover {
    background: #fab387;
    color: #11111b;
}

.btn-icon-pdm.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.highlight-quality {
    color: #cba6f7;
    font-weight: 700;
}

/* PDM SIDE DRAWER */
.pdm-drawer {
    position: fixed;
    top: 0;
    right: -60%; /* Inizia fuori schermo */
    width: 60%;
    height: 100vh;
    background: #181825;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.pdm-drawer.open {
    right: 0;
}

.pdm-clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.pdm-clickable-row:hover {
    background: rgba(250, 179, 135, 0.05) !important;
}

.btn-close-drawer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a6adc8;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.2rem;
}

.btn-close-drawer:hover {
    background: #f38ba8; /* Rosso/Rosa intenso */
    color: #11111b;
    transform: rotate(90deg);
    border-color: transparent;
}

.pdm-format-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.icon-pdf {
    color: #f38ba8; /* Rosso Catppuccin */
    font-size: 1.1rem;
}

.icon-step {
    color: #f9e2af; /* Giallo Fluo / Peach Catppuccin */
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(249, 226, 175, 0.4);
}

.icon-dxf {
    color: #a6e3a1; /* Verde Catppuccin */
    font-size: 1.1rem;
}

.pdm-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pdm-pdf-viewer {
    width: 100%;
    height: 85vh; /* Ingrandito per coprire quasi tutto il drawer */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.pdm-pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdm-drawer-actions {
    padding: 20px;
    background: #1e1e2e;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 10px;
}

.pdm-checkbox-col {
    width: 40px;
    text-align: center;
}

.pdm-table input[type="checkbox"]:disabled {
    opacity: 0.1;
    cursor: not-allowed;
}

/* Status Badges (Quadratini) */
.status-badge {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.status-released {
    background-color: #a6e3a1; /* Verde */
    box-shadow: 0 0 8px rgba(166, 227, 161, 0.4);
}

.status-checkout {
    background-color: #fab387; /* Arancione */
    box-shadow: 0 0 8px rgba(250, 179, 135, 0.4);
}

.status-checkin {
    background-color: #89dceb; /* Ciano */
    box-shadow: 0 0 8px rgba(137, 220, 235, 0.4);
}

.status-other {
    background-color: #585b70;
}

/* File Format Labels (Scritte) */
.pdm-format-labels {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.label-pdf {
    color: #f38ba8;
    border: 1px solid rgba(243, 139, 168, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(243, 139, 168, 0.05);
}

.label-dxf {
    color: #a6e3a1;
    border: 1px solid rgba(166, 227, 161, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(166, 227, 161, 0.05);
}

.label-step {
    color: #f9e2af; /* Giallo Fluo */
    border: 1px solid rgba(249, 226, 175, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(249, 226, 175, 0.05);
    text-shadow: 0 0 5px rgba(249, 226, 175, 0.3);
}

/* REVISION HISTORY POPUP */
.pdm-rev-link {
    color: #89b4fa;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.pdm-rev-link:hover {
    color: #fab387;
}

.pdm-rev-popup {
    position: absolute;
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2000;
    min-width: 250px;
    display: none;
    overflow: hidden;
    animation: slideUp 0.2s ease-out;
}

.pdm-rev-popup-header {
    background: #181825;
    padding: 10px 15px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #cba6f7;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pdm-rev-list {
    max-height: 300px;
    overflow-y: auto;
}

.pdm-rev-item {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    cursor: pointer;
    transition: background 0.2s;
}

.pdm-rev-item:hover {
    background: rgba(255,255,255,0.05);
}

.pdm-rev-item .rev-num {
    font-weight: 700;
    color: #cdd6f4;
}

.pdm-rev-item .rev-status {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: #313244;
}

.pdm-rev-item .rev-status.status-released {
    color: #a6e3a1;
}

.pdm-rev-item .rev-date {
    font-size: 0.75rem;
    color: #585b70;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
