.modal-lab-content {
    position: relative;
    width: min(95vw, 1300px); 
    height: min(85vh, 750px); 
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.9);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.lab-grid-overlay {
    width: 100%;
    height: 100%;
    padding: 85px 30px 30px 30px; 
    box-sizing: border-box;
}

#lab-grid {
    width: 100%;
    height: 100%;
    overflow-y: auto !important;
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-auto-rows: min-content;           
    gap: 20px;                             
    box-sizing: border-box;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #ff0000 #0a0a0a;
}

.lab-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.lab-item:hover { 
    border: 1px solid #ff0000; 
}

.lab-item .pdf-label { 
    color: #fff; 
    font-size: 30px; 
    font-weight: bold;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.25s ease;
}

/* ПУЛЬСАЦИЯ ДОКУМЕНТОВ LAB ПРИ НАВЕДЕНИИ */
.lab-item:hover .pdf-label {
    border-color: rgba(255, 0, 0, 0.4);
    animation: cyber-pulse 3s infinite linear;
}

.lab-loading {
    grid-column: span 3;
    color: #666;
    font-size: 32px;
    letter-spacing: 3px;
    text-align: center;
    padding: 40px;
}